solidity/test/libsolidity/semanticTests/reverts/invalid_enum_as_external_arg.sol
2020-03-19 14:42:25 +01:00

21 lines
323 B
Solidity

contract C {
enum X {A, B}
function tested(X x) public returns (uint256) {
return 1;
}
function test() public returns (uint256) {
X garbled;
assembly {
garbled := 5
}
return this.tested(garbled);
}
}
// ----
// test() -> FAILURE # should throw #