From bd758a5e35538e693c1a70e7eb7aecd5d7e1bc5c Mon Sep 17 00:00:00 2001 From: wechman Date: Mon, 8 Aug 2022 12:21:49 +0200 Subject: [PATCH] Call user defined type operator by member function --- .../custom/call_operator_by_member_function.sol | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/libsolidity/syntaxTests/operators/custom/call_operator_by_member_function.sol diff --git a/test/libsolidity/syntaxTests/operators/custom/call_operator_by_member_function.sol b/test/libsolidity/syntaxTests/operators/custom/call_operator_by_member_function.sol new file mode 100644 index 000000000..27a4c2d53 --- /dev/null +++ b/test/libsolidity/syntaxTests/operators/custom/call_operator_by_member_function.sol @@ -0,0 +1,15 @@ +type Int is int16; + +using {add as +} for Int; + +function add(Int, Int) returns (Int) { + return Int.wrap(0); +} + +function f() { + Int a; + a.add(a); +} + +// ---- +// TypeError 9582: (143-148): Member "add" not found or not visible after argument-dependent lookup in Int.