mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Tests.
This commit is contained in:
committed by
chriseth
parent
04d8ad2ae1
commit
e255c15227
@@ -0,0 +1,15 @@
|
||||
contract C {
|
||||
function() internal view returns(uint256) immutable z;
|
||||
constructor() public {
|
||||
z = f;
|
||||
}
|
||||
function f() public view returns (uint256) {
|
||||
return 7;
|
||||
}
|
||||
function callZ() public view returns (uint) {
|
||||
return z();
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// f() -> 7
|
||||
// callZ() -> 7
|
||||
Reference in New Issue
Block a user