mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
16 lines
469 B
Solidity
16 lines
469 B
Solidity
|
contract test {
|
||
|
mapping(uint=>uint) map;
|
||
|
function fun() public view {
|
||
|
mapping(uint=>uint) storage a = map;
|
||
|
mapping(uint=>uint) storage b = map;
|
||
|
b = a;
|
||
|
(b) = a;
|
||
|
(b, b) = (a, a);
|
||
|
}
|
||
|
}
|
||
|
// ----
|
||
|
// TypeError: (176-177): Mappings cannot be assigned to.
|
||
|
// TypeError: (192-193): Mappings cannot be assigned to.
|
||
|
// TypeError: (209-210): Mappings cannot be assigned to.
|
||
|
// TypeError: (212-213): Mappings cannot be assigned to.
|