mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			321 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			321 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
| // SPDX-License-Identifier: GPL-3.0
 | |
| pragma solidity *;
 | |
| 
 | |
| contract C {
 | |
|     // This will trigger an error at the compilation stage.
 | |
|     // CodeGenerationError due to immutable initialization in constructor being optimized out.
 | |
|     uint immutable public x;
 | |
| 
 | |
|     constructor() {
 | |
|         x = 0;
 | |
|         while (true) {}
 | |
|     }
 | |
| }
 |