Merge pull request #12966 from a3d4/fix-ice-structtype-nativemembers

Fix ICE caused by an immutable struct with mapping
This commit is contained in:
Mathias L. Baumann
2022-06-23 16:11:28 +02:00
committed by GitHub
4 changed files with 28 additions and 6 deletions
@@ -0,0 +1,9 @@
contract Contract {
struct S {
int k;
}
S immutable s;
}
// ----
// TypeError 6377: (61-74): Immutable variables cannot have a non-value type.
@@ -0,0 +1,9 @@
contract Contract {
struct S {
mapping(uint => address) map;
}
S immutable s;
}
// ----
// TypeError 6377: (84-97): Immutable variables cannot have a non-value type.