mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
23 lines
476 B
Solidity
23 lines
476 B
Solidity
|
contract C {
|
||
|
function() internal returns (uint)[20] x;
|
||
|
int256 mutex;
|
||
|
|
||
|
function one() public returns (uint256) {
|
||
|
function() internal returns (uint)[20] memory xmem;
|
||
|
x = xmem;
|
||
|
return 3;
|
||
|
}
|
||
|
|
||
|
function two() public returns (uint256) {
|
||
|
if (mutex > 0) return 7;
|
||
|
mutex = 1;
|
||
|
// If this test fails, it might re-execute this function.
|
||
|
x[0]();
|
||
|
return 2;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// ----
|
||
|
// one() -> 3
|
||
|
// two() -> FAILURE
|