mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
27 lines
515 B
Solidity
27 lines
515 B
Solidity
|
// This tests skipping the extcodesize check.
|
||
|
|
||
|
contract T {
|
||
|
constructor() { this.f(); }
|
||
|
function f() external {}
|
||
|
}
|
||
|
contract U {
|
||
|
constructor() { this.f(); }
|
||
|
function f() external returns (uint) {}
|
||
|
}
|
||
|
|
||
|
contract C {
|
||
|
function f(uint c) external returns (uint) {
|
||
|
if (c == 0) new T();
|
||
|
else if (c == 1) new U();
|
||
|
return 1 + c;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// ====
|
||
|
// EVMVersion: >=byzantium
|
||
|
// compileViaYul: also
|
||
|
// ----
|
||
|
// f(uint256): 0 -> FAILURE
|
||
|
// f(uint256): 1 -> FAILURE
|
||
|
// f(uint256): 2 -> 3
|