Fixed recursive check in structureSizeEstimate

This commit is contained in:
a3d4
2020-07-02 04:14:58 +02:00
parent ea46636ad2
commit c2e1273ff4
9 changed files with 34 additions and 21 deletions
@@ -0,0 +1,4 @@
contract C {
mapping(uint => uint[2**100]) x;
}
// ----
@@ -0,0 +1,4 @@
contract C {
uint[200][200][2**30][][2**30] x;
}
// ----
@@ -0,0 +1,18 @@
contract C {
struct P0 { uint256[2**63] x; }
struct S0 {
P0[2**62] y;
P0 x;
}
S0 s0;
struct P1 { uint256[2**63] x; }
struct S1 {
P1 x;
P1[2**62] y;
}
S1 s1;
}
// ----
// Warning 3408: (110-115): Variable covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 3408: (215-220): Variable covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
@@ -1,5 +0,0 @@
contract C {
uint[200][200][2**30][][2**30] x;
}
// ----
// Warning 3408: (17-49): Variable covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
@@ -1,5 +0,0 @@
contract C {
mapping(uint => uint[2**100]) x;
}
// ----
// Warning 3408: (17-48): Variable covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.