solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/132_enum_to_enum_conversion_is_not_okay.sol
2020-07-07 12:16:18 +02:00

10 lines
277 B
Solidity

contract test {
enum Paper { Up, Down, Left, Right }
enum Ground { North, South, West, East }
constructor() {
Ground(Paper.Up);
}
}
// ----
// TypeError 9640: (130-146): Explicit type conversion not allowed from "enum test.Paper" to "enum test.Ground".