mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix infinite loop for structs in library function parameter
This commit is contained in:
+10
@@ -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.
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
library a {
|
||||
struct b {
|
||||
mapping (uint => b) c ;
|
||||
}
|
||||
function d(b storage) public {}
|
||||
}
|
||||
Reference in New Issue
Block a user