mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
12 lines
349 B
Solidity
12 lines
349 B
Solidity
contract test {
|
|
enum ActionChoices { GoLeft, GoRight, GoStraight, Sit }
|
|
function test() public {
|
|
a = 2;
|
|
b = ActionChoices(a);
|
|
}
|
|
uint256 a;
|
|
ActionChoices b;
|
|
}
|
|
// ----
|
|
// Warning: (80-155): Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
|