diff options
Diffstat (limited to 'test/libsolidity/syntaxTests/types/mapping/assignment_local.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/types/mapping/assignment_local.sol | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/types/mapping/assignment_local.sol b/test/libsolidity/syntaxTests/types/mapping/assignment_local.sol new file mode 100644 index 00000000..ba01c44a --- /dev/null +++ b/test/libsolidity/syntaxTests/types/mapping/assignment_local.sol @@ -0,0 +1,15 @@ +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. |