solidity/test/libsolidity/semanticTests/functionCall/calling_uninitialized_function_in_detail.sol

24 lines
481 B
Solidity
Raw Normal View History

contract C {
function() returns (uint256) internal x;
int256 mutex;
function t() public returns (uint256) {
if (mutex > 0) {
assembly {
mstore(0, 7)
return(0, 0x20)
}
}
mutex = 1;
// Avoid re-executing this function if we jump somewhere.
x();
return 2;
}
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
2020-10-13 11:28:39 +00:00
// t() -> FAILURE, hex"4e487b71", 0x51