mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			422 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			422 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
contract Base {
 | 
						|
    constructor() {}
 | 
						|
 | 
						|
    uint256 m_base = 5;
 | 
						|
 | 
						|
    function getBMember() public returns (uint256 i) {
 | 
						|
        return m_base;
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
contract Derived is Base {
 | 
						|
    constructor() {}
 | 
						|
 | 
						|
    uint256 m_derived = 6;
 | 
						|
 | 
						|
    function getDMember() public returns (uint256 i) {
 | 
						|
        return m_derived;
 | 
						|
    }
 | 
						|
}
 | 
						|
// ====
 | 
						|
// compileViaYul: also
 | 
						|
// compileToEwasm: also
 | 
						|
// ----
 | 
						|
// getBMember() -> 5
 | 
						|
// getDMember() -> 6
 |