Add test for external call inside operator function

This commit is contained in:
wechman 2022-08-09 11:52:22 +02:00
parent 9badef916e
commit 6ebefdd1f8

View File

@ -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