mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			379 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			379 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
contract C {
 | 
						|
    int8 a;
 | 
						|
    uint8 b;
 | 
						|
    int8 c;
 | 
						|
    uint8 d;
 | 
						|
 | 
						|
    function test()
 | 
						|
        public
 | 
						|
        returns (uint256 x1, uint256 x2, uint256 x3, uint256 x4)
 | 
						|
    {
 | 
						|
        a = -2;
 | 
						|
        b = -uint8(a) * 2;
 | 
						|
        c = a * int8(120) * int8(121);
 | 
						|
        x1 = uint256(a);
 | 
						|
        x2 = b;
 | 
						|
        x3 = uint256(c);
 | 
						|
        x4 = d;
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
// ----
 | 
						|
// test() -> -2, 4, -112, 0
 |