solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/016_assignment_to_mapping.sol

14 lines
298 B
Solidity

contract test {
struct str {
mapping(uint=>uint) map;
}
str data;
function fun() public {
var a = data.map;
data.map = a;
}
}
// ----
// Warning: (122-127): Use of the "var" keyword is deprecated.
// TypeError: (148-160): Mappings cannot be assigned to.