mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
18 lines
513 B
Solidity
18 lines
513 B
Solidity
contract test {
|
|
struct str {
|
|
mapping(uint=>uint) map;
|
|
}
|
|
str data;
|
|
function fun() public {
|
|
mapping(uint=>uint) storage a = data.map;
|
|
data.map = a;
|
|
(data.map) = a;
|
|
(data.map, data.map) = (a, a);
|
|
}
|
|
}
|
|
// ----
|
|
// TypeError 9214: (172-180): Mappings cannot be assigned to.
|
|
// TypeError 9214: (195-203): Mappings cannot be assigned to.
|
|
// TypeError 9214: (219-227): Mappings cannot be assigned to.
|
|
// TypeError 9214: (229-237): Mappings cannot be assigned to.
|