solidity/test/libsolidity/semanticTests/reverts/invalid_enum_as_external_arg.sol
2021-01-19 13:04:45 -05:00

24 lines
425 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);
}
}
// ====
// compileViaYul: also
// compileToEwasm: also
// EVMVersion: >=byzantium
// ----
// test() -> FAILURE, hex"4e487b71", 0x21 # should throw #