aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/nameAndTypeResolution/016_assignment_to_mapping.sol
blob: 27b1ea9699642932a29b461f9ad1fac32c815885 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
contract test {
    struct str {
        mapping(uint=>uint) map;
    }
    str data;
    function fun() public {
        mapping(uint=>uint) storage a = data.map;
        data.map = a;
    }
}
// ----
// TypeError: (172-184): Mappings cannot be assigned to.