mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
14 lines
280 B
Solidity
14 lines
280 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: (139-151): True expression's type enum C.small doesn't match false expression's type enum C.big.
|