Skip to content

Commit 4aae044

Browse files
fixup! Update and add tests
1 parent 49a878b commit 4aae044

File tree

5 files changed

+24
-0
lines changed

5 files changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
address constant x = 0xdCad3a6d3569DF655070DEd06cb7A1b2Ccd1D3AF;
2+
contract C layout at x {
3+
4+
}
5+
// ----
6+
// TypeError 6396: (86-87): The base slot of the storage layout must evaluate to a rational number.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bool constant x = false;
2+
contract C layout at x {}
3+
// ----
4+
// TypeError 6396: (46-47): The base slot of the storage layout must evaluate to a rational number.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
bytes32 constant x = "ABC";
2+
contract A layout at x {}
3+
contract C layout at x[1] {}
4+
// ----
5+
// TypeError 6396: (49-50): The base slot of the storage layout must evaluate to a rational number.
6+
// TypeError 6396: (75-79): The base slot of the storage layout must evaluate to a rational number.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
uint constant x = 42;
2+
uint constant y = x * 2;
3+
contract C layout at y {}
4+
// ----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
int constant x = 42;
2+
contract C layout at x {}
3+
// ----
4+
// TypeError 1481: (42-43): The base slot expression must be a constant unsigned integer value.

0 commit comments

Comments
 (0)