mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			312 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			312 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
| contract C {
 | |
|     uint256 public a = 42;
 | |
| 
 | |
|     function f() public {
 | |
|         a = 1;
 | |
|         revert();
 | |
|     }
 | |
| 
 | |
|     function g() public {
 | |
|         a = 1;
 | |
|         assembly {
 | |
|             revert(0, 0)
 | |
|         }
 | |
|     }
 | |
| }
 | |
| 
 | |
| // ====
 | |
| // compileViaYul: also
 | |
| // ----
 | |
| // f() -> FAILURE
 | |
| // a() -> 42
 | |
| // g() -> FAILURE
 | |
| // a() -> 42
 |