aboutsummaryrefslogblamecommitdiffstats
path: root/test/libsolidity/syntaxTests/nameAndTypeResolution/284_conditional_expression_with_different_struct.sol
blob: 049d9e21e77ec6f37b370933ad3d4219b9328f51 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                                                                            
contract C {
    struct s1 {
        uint x;
    }
    struct s2 {
        uint x;
    }
    function f() public {
        s1 memory x;
        s2 memory y;
        true ? x : y;
    }
}
// ----
// TypeError: (165-177): True expression's type struct C.s1 memory doesn't match false expression's type struct C.s2 memory.