mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			313 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			313 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
// Tests that rational numbers (even negative ones) are encoded properly.
 | 
						|
pragma abicoder               v2;
 | 
						|
 | 
						|
 | 
						|
contract C {
 | 
						|
    function f() public pure returns (bytes memory) {
 | 
						|
        return abi.encode(1, -2);
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
// ====
 | 
						|
// compileToEwasm: also
 | 
						|
// compileViaYul: also
 | 
						|
// ----
 | 
						|
// f() -> 0x20, 0x40, 0x1, -2
 |