mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			315 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			315 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
contract C {
 | 
						|
    function f(int16[] calldata a) external returns (bool correct) {
 | 
						|
        uint32 x = uint32(uint16(a[1]));
 | 
						|
        uint r;
 | 
						|
        assembly {
 | 
						|
            r := x
 | 
						|
        }
 | 
						|
        correct = r == 0x7fff;
 | 
						|
    }
 | 
						|
}
 | 
						|
// ====
 | 
						|
// compileViaYul: also
 | 
						|
// ----
 | 
						|
// f(int16[]): 0x20, 0x02, 0x7fff, 0x7fff -> true
 |