aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/nameAndTypeResolution/286_conditional_expression_with_different_enum.sol
blob: 8c312624353f771b251e58f46d6a5c669f8cdd3d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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.