solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/132_enum_to_enum_conversion_is_not_okay.sol

10 lines
277 B
Solidity
Raw Normal View History

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