solidity/test/libsolidity/semanticTests/array/copy_function_storage_array.sol

19 lines
364 B
Solidity
Raw Normal View History

contract C {
function() internal returns (uint)[] x;
function() internal returns (uint)[] y;
function test() public returns (uint256) {
x = new function() internal returns (uint)[](10);
x[9] = a;
y = x;
return y[9]();
}
function a() public returns (uint256) {
return 7;
}
}
// ----
// test() -> 7