mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
40 lines
840 B
Solidity
40 lines
840 B
Solidity
// bug #1801
|
|
contract test {
|
|
enum ActionChoices { GoLeft, GoRight, GoStraight, Sit }
|
|
constructor(ActionChoices param) public {}
|
|
function ret() public returns (ActionChoices) {
|
|
ActionChoices action = ActionChoices.GoLeft;
|
|
return action;
|
|
}
|
|
}
|
|
// ----
|
|
// :test
|
|
// [
|
|
// {
|
|
// "inputs":
|
|
// [
|
|
// {
|
|
// "internalType": "enum test.ActionChoices",
|
|
// "name": "param",
|
|
// "type": "uint8"
|
|
// }
|
|
// ],
|
|
// "stateMutability": "nonpayable",
|
|
// "type": "constructor"
|
|
// },
|
|
// {
|
|
// "inputs": [],
|
|
// "name": "ret",
|
|
// "outputs":
|
|
// [
|
|
// {
|
|
// "internalType": "enum test.ActionChoices",
|
|
// "name": "",
|
|
// "type": "uint8"
|
|
// }
|
|
// ],
|
|
// "stateMutability": "nonpayable",
|
|
// "type": "function"
|
|
// }
|
|
// ]
|