mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add test for external call inside operator function
This commit is contained in:
parent
9badef916e
commit
6ebefdd1f8
@ -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
|
Loading…
Reference in New Issue
Block a user