mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			328 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			328 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
| struct error { uint error; }
 | |
| contract C {
 | |
| 	error test();
 | |
| 	error _struct;
 | |
| 	function f() public {
 | |
| 		revert test();
 | |
| 	}
 | |
| 	function g(uint x) public returns (uint) {
 | |
| 		_struct.error = x;
 | |
| 		return _struct.error;
 | |
| 	}
 | |
| }
 | |
| // ====
 | |
| // compileViaYul: also
 | |
| // compileToEwasm: also
 | |
| // ----
 | |
| // f() -> FAILURE, hex"f8a8fd6d"
 | |
| // g(uint256): 7 -> 7
 |