diff --git a/test/libsolidity/syntaxTests/operators/userDefined/implementing_operator_with_privately_overloaded_function.sol b/test/libsolidity/syntaxTests/operators/userDefined/implementing_operator_with_privately_overloaded_function.sol new file mode 100644 index 000000000..102dfc674 --- /dev/null +++ b/test/libsolidity/syntaxTests/operators/userDefined/implementing_operator_with_privately_overloaded_function.sol @@ -0,0 +1,12 @@ +using {L.add as +} for A; +using {L.add as +} for AP; + +library L { + function add(A, A) private pure returns (A) {} + function add(AP, AP) internal pure returns (AP) {} +} + +type A is address; +type AP is address payable; +// ---- +// DeclarationError 7920: (7-12): Identifier not found or not unique. diff --git a/test/libsolidity/syntaxTests/operators/userDefined/using_for_attaching_functions_and_defining_operators_same_directive.sol b/test/libsolidity/syntaxTests/operators/userDefined/using_for_attaching_functions_and_defining_operators_same_directive.sol new file mode 100644 index 000000000..9b83faa59 --- /dev/null +++ b/test/libsolidity/syntaxTests/operators/userDefined/using_for_attaching_functions_and_defining_operators_same_directive.sol @@ -0,0 +1,10 @@ +type AP is address payable; + +function sub(AP, AP) pure returns (AP) {} +function unsub(AP) pure returns (AP) {} + +function attachedPure(AP, uint, address) pure {} +function attachedView(AP) view {} +function attached(AP, function(AP)) {} + +using {sub as -, attachedPure, attachedView, unsub as -, attached} for AP;