Fix ICE caused by storage parameters with nested mappings in libraries

This commit is contained in:
a3d4
2020-10-07 22:07:57 +02:00
parent 93df3d43df
commit d7b4b4a7aa
5 changed files with 31 additions and 2 deletions
@@ -0,0 +1,6 @@
struct S { mapping(uint => uint)[2] a; }
contract C {
function f(S storage s) public {}
}
// ----
// TypeError 6651: (69-80): Data location must be "memory" or "calldata" for parameter in function, but "storage" was given.
@@ -0,0 +1,4 @@
struct S { mapping(uint => uint)[2] a; }
library L {
function f(S storage s) public {}
}
@@ -0,0 +1,5 @@
library Test {
struct Nested { mapping(uint => uint)[2][] a; }
struct X { Nested n; }
function f(X storage x) public {}
}