solidity/test/libsolidity/semanticTests/enums/using_enums.sol
2023-05-11 10:56:55 -05:00

16 lines
294 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;
}
// ----
// getChoice() -> 2