mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			11 lines
		
	
	
		
			352 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			352 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
contract C {
 | 
						|
    function f(uint[2][] calldata x) public returns (uint o, uint l, uint s) {
 | 
						|
        assembly { l := x.length o := x.offset }
 | 
						|
        uint[2] calldata t = x[1];
 | 
						|
        // statically-sized arrays only use one slot, so we read directly.
 | 
						|
        assembly { s := t }
 | 
						|
    }
 | 
						|
}
 | 
						|
// ----
 | 
						|
// f(uint256[2][]): 0x20, 2, 1, 2, 3, 4 -> 0x44, 2, 0x84
 |