aboutsummaryrefslogblamecommitdiffstats
path: root/test/libsolidity/syntaxTests/nameAndTypeResolution/287_conditional_expression_with_different_mapping.sol
blob: 8139f3ed94474e3a08d928cac5956d4a07efca60 (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                                                                                                       
contract C {
    mapping(uint8 => uint8) table1;
    mapping(uint32 => uint8) table2;

    function f() public {
        true ? table1 : table2;
    }
}
// ----
// TypeError: (121-143): True expression's type mapping(uint8 => uint8) doesn't match false expression's type mapping(uint32 => uint8).