mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			410 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			410 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
contract c {
 | 
						|
    uint256[] data;
 | 
						|
 | 
						|
    function test()
 | 
						|
        public
 | 
						|
        returns (uint256 x, uint256 y, uint256 z, uint256 l)
 | 
						|
    {
 | 
						|
        data.push(5);
 | 
						|
        x = data[0];
 | 
						|
        data.push(4);
 | 
						|
        y = data[1];
 | 
						|
        data.push(3);
 | 
						|
        l = data.length;
 | 
						|
        z = data[2];
 | 
						|
    }
 | 
						|
}
 | 
						|
// ----
 | 
						|
// test() -> 5, 4, 3, 3
 | 
						|
// gas irOptimized: 111363
 | 
						|
// gas legacy: 111807
 | 
						|
// gas legacyOptimized: 111122
 |