You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function f(mapping(uint128=> S) storages) internalpurereturns (mapping(uint128=> S) storages2) {
s2 = s; // pass the compilation
s = s2; // TypeError: Types in storage containing (nested) mappings cannot be assigned to.
}
s and s2 are both mapping-type declarations in function f. But the assignments to them cause different results.
Perhaps this is an intentional behavior, but the error message is misleading. It implies the assignment to s2 should also be forbidden.
Environment
Compiler version: 0.8.28
The text was updated successfully, but these errors were encountered:
Description
s
ands2
are both mapping-type declarations in functionf
. But the assignments to them cause different results.Perhaps this is an intentional behavior, but the error message is misleading. It implies the assignment to
s2
should also be forbidden.Environment
The text was updated successfully, but these errors were encountered: