mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			340 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			340 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
| contract test {
 | |
|     function f(uint x) public returns(uint d) {
 | |
|         return x > 100 ?
 | |
|                     x > 1000 ? 1000 : 100
 | |
|                     :
 | |
|                     x > 50 ? 50 : 10;
 | |
|     }
 | |
| }
 | |
| // ====
 | |
| // compileViaYul: also
 | |
| // ----
 | |
| // f(uint256): 1001 -> 1000
 | |
| // f(uint256): 500 -> 100
 | |
| // f(uint256): 80 -> 50
 | |
| // f(uint256): 40 -> 10
 |