mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			268 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			268 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
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
 |