Skip to content

Commit 54dab60

Browse files
fixup! tests
1 parent c23121e commit 54dab60

File tree

8 files changed

+29
-2
lines changed

8 files changed

+29
-2
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
contract A {}
22

3+
contract B layout at address(0x1234) {}
34
contract C layout at address(new A()) {}
45
contract D layout at uint160(address(this)) {}
56
// ----
6-
// TypeError 1139: (36-52): The base slot of the storage layout must be a compile-time constant expression.
7-
// TypeError 1139: (77-99): The base slot of the storage layout must be a compile-time constant expression.
7+
// TypeError 6396: (36-51): The base slot of the storage layout must evaluate to a rational number.
8+
// TypeError 1139: (76-92): The base slot of the storage layout must be a compile-time constant expression.
9+
// TypeError 1139: (117-139): The base slot of the storage layout must be a compile-time constant expression.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
contract C layout at [1, 2, 3] {}
2+
// ----
3+
// TypeError 6396: (21-30): The base slot of the storage layout must evaluate to a rational number.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
contract C layout at true {}
2+
// ----
3+
// TypeError 6396: (21-25): The base slot of the storage layout must evaluate to a rational number.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
enum Color {Red, Green, Blue}
2+
3+
contract C layout at Color.Red {}
4+
// ----
5+
// TypeError 6396: (52-61): The base slot of the storage layout must evaluate to a rational number.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
contract C layout at hex"616263" {}
2+
// ----
3+
// TypeError 6396: (21-32): The base slot of the storage layout must evaluate to a rational number.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
contract A layout at addmod(1, 2, 3) {}
2+
contract B layout at mulmod(3, 2, 1) {}
3+
// ----
4+
// TypeError 6396: (21-36): The base slot of the storage layout must evaluate to a rational number.
5+
// TypeError 6396: (61-76): The base slot of the storage layout must evaluate to a rational number.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
contract C layout at "MyLayoutBase" {}
2+
// ----
3+
// TypeError 6396: (21-35): The base slot of the storage layout must evaluate to a rational number.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
contract C layout at (1, 2, 3) {}
2+
// ----
3+
// TypeError 6396: (21-30): The base slot of the storage layout must evaluate to a rational number.

0 commit comments

Comments
 (0)