mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			327 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			327 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
contract test {
 | 
						|
    enum ActionChoices {GoLeft, GoRight, GoStraight, Sit}
 | 
						|
 | 
						|
    constructor() {
 | 
						|
        choices = ActionChoices.GoStraight;
 | 
						|
    }
 | 
						|
 | 
						|
    function getChoice() public returns (uint256 d) {
 | 
						|
        d = uint256(choices);
 | 
						|
    }
 | 
						|
 | 
						|
    ActionChoices choices;
 | 
						|
}
 | 
						|
 | 
						|
// ====
 | 
						|
// compileToEwasm: also
 | 
						|
// ----
 | 
						|
// getChoice() -> 2
 |