mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			211 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			211 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
contract A {
 | 
						|
    uint256 constant x = 7;
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
contract B is A {
 | 
						|
    function f() public returns (uint256) {
 | 
						|
        return A.x;
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
// ====
 | 
						|
// compileToEwasm: also
 | 
						|
// compileViaYul: also
 | 
						|
// ----
 | 
						|
// f() -> 7
 |