mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			468 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			468 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
contract A {
 | 
						|
    constructor(uint) {}
 | 
						|
}
 | 
						|
contract B {
 | 
						|
    constructor(uint) {}
 | 
						|
}
 | 
						|
contract C {
 | 
						|
    constructor(uint) {}
 | 
						|
}
 | 
						|
contract D {
 | 
						|
    constructor(uint) {}
 | 
						|
}
 | 
						|
contract X is D, C, B, A {
 | 
						|
    uint[] x;
 | 
						|
    function f(uint _x) internal returns (uint) {
 | 
						|
        x.push(_x);
 | 
						|
    }
 | 
						|
    function g() public view returns (uint[] memory) { return x; }
 | 
						|
    constructor() A(f(1)) C(f(2)) B(f(3)) D(f(4)) {}
 | 
						|
}
 | 
						|
// ====
 | 
						|
// compileViaYul: also
 | 
						|
// ----
 | 
						|
// g() -> 0x20, 4, 1, 3, 2, 4
 |