diff --git a/test/libsolidity/semanticTests/operators/custom/external_call_inside_operator_function.sol b/test/libsolidity/semanticTests/operators/custom/external_call_inside_operator_function.sol new file mode 100644 index 000000000..d82f9ccb3 --- /dev/null +++ b/test/libsolidity/semanticTests/operators/custom/external_call_inside_operator_function.sol @@ -0,0 +1,24 @@ +type Int is int16; + +using {add as +} for Int; + + +function add(Int, Int) returns (Int) { + B b = new B(); + return b.f(); +} + +contract B { + function f() pure external returns (Int) { + return Int.wrap(3); + } +} + +contract C { + function test() public returns (Int) { + return Int.wrap(0) + Int.wrap(0); + } +} + +// ---- +// test() -> 3