Fix infinite loop for structs in library function parameter

This commit is contained in:
Harikrishnan Mulackal
2020-08-27 14:18:07 +02:00
parent 1a930de5a1
commit 7826564226
4 changed files with 60 additions and 39 deletions
@@ -0,0 +1,10 @@
library a {
struct b {
mapping (uint => b) c ;
}
// Segfaults in https://github.com/ethereum/solidity/issues/9443
function d(b memory) public {}
}
// ----
// TypeError 4103: (149-157): Recursive structs can only be passed as storage pointers to libraries, not as memory objects to contract functions.
// TypeError 4061: (149-157): Type struct a.b is only valid in storage because it contains a (nested) mapping.
@@ -0,0 +1,6 @@
library a {
struct b {
mapping (uint => b) c ;
}
function d(b storage) public {}
}