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

10 lines
279 B
Solidity
Raw Normal View History

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