mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			334 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			334 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
| contract A {
 | |
|     uint immutable public x = 1;
 | |
|     uint public y;
 | |
|     constructor() {
 | |
|         y = this.x();
 | |
|     }
 | |
| }
 | |
| contract C {
 | |
|     function f() public returns (bool) {
 | |
|         try new A() { return false; }
 | |
|         catch { return true; }
 | |
|     }
 | |
| }
 | |
| // ====
 | |
| // EVMVersion: >=tangerineWhistle
 | |
| // compileViaYul: also
 | |
| // ----
 | |
| // f() -> true
 |