solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/286_conditional_expression_with_different_enum.sol
2020-07-06 13:44:33 +02:00

14 lines
286 B
Solidity

contract C {
enum small { A, B, C, D }
enum big { A, B, C, D }
function f() public {
small x;
big y;
true ? x : y;
}
}
// ----
// TypeError 1080: (139-151): True expression's type enum C.small does not match false expression's type enum C.big.