2020-03-09 21:14:07 +00:00
|
|
|
abstract contract D {
|
|
|
|
function g() public virtual;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
contract C {
|
2020-11-10 13:14:43 +00:00
|
|
|
D d = D(address(0x1212));
|
2020-03-09 21:14:07 +00:00
|
|
|
|
|
|
|
function f() public returns (uint256) {
|
|
|
|
d.g();
|
|
|
|
return 7;
|
|
|
|
}
|
|
|
|
|
|
|
|
function g() public returns (uint256) {
|
2020-04-03 14:29:17 +00:00
|
|
|
d.g{gas: 200}();
|
2020-03-09 21:14:07 +00:00
|
|
|
return 7;
|
|
|
|
}
|
|
|
|
|
|
|
|
function h() public returns (uint256) {
|
|
|
|
address(d).call(""); // this does not throw (low-level)
|
|
|
|
return 7;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-19 13:12:56 +00:00
|
|
|
// ====
|
2020-11-21 13:54:16 +00:00
|
|
|
// compileToEwasm: also
|
2021-03-12 23:02:36 +00:00
|
|
|
// compileViaYul: also
|
2020-03-09 21:14:07 +00:00
|
|
|
// ----
|
|
|
|
// f() -> FAILURE
|
|
|
|
// g() -> FAILURE
|
|
|
|
// h() -> 7
|