mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			9 lines
		
	
	
		
			247 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
		
			247 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
| contract C {
 | |
|     uint256 value;
 | |
|     constructor() {
 | |
|         value = msg.value;
 | |
|     }
 | |
| }
 | |
| // ----
 | |
| // TypeError 5887: (68-77): "msg.value" and "callvalue()" can only be used in payable constructors. Make the constructor "payable" to avoid this error.
 |