Skip to content

Commit 96290f8

Browse files
Update and add tests
1 parent b8e81b9 commit 96290f8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+96
-34
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
contract C layout at abi.decode(abi.encode(42), (uint)) {}
22
// ----
3-
// TypeError 6396: (21-55): The base slot of the storage layout must evaluate to a rational number.
3+
// TypeError 1505: (21-55): The base slot expression contains elements that are not yet supported by the internal constant evaluator and therefore cannot be evaluated at compilation time.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
contract C layout at address(0x1234) {}
22
// ----
3-
// TypeError 6396: (21-36): The base slot of the storage layout must evaluate to a rational number.
3+
// TypeError 6396: (21-36): The base slot of the storage layout must evaluate to an integer number.
Lines changed: 6 additions & 0 deletions
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 an integer number.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
contract C layout at [1, 2, 3] {}
22
// ----
3-
// TypeError 6396: (21-30): The base slot of the storage layout must evaluate to a rational number.
3+
// TypeError 6396: (21-30): The base slot of the storage layout must evaluate to an integer number.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
contract C layout at ~uint(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) {}
22
// ----
3-
// TypeError 6396: (21-94): The base slot of the storage layout must evaluate to a rational number.
3+
// TypeError 1505: (21-94): The base slot expression contains elements that are not yet supported by the internal constant evaluator and therefore cannot be evaluated at compilation time.
Lines changed: 4 additions & 0 deletions
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 an integer number.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
contract C layout at true {}
22
// ----
3-
// TypeError 6396: (21-25): The base slot of the storage layout must evaluate to a rational number.
3+
// TypeError 6396: (21-25): The base slot of the storage layout must evaluate to an integer number.
Lines changed: 6 additions & 0 deletions
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 an integer number.
6+
// TypeError 6396: (75-79): The base slot of the storage layout must evaluate to an integer number.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
uint constant N = 100;
22
contract C layout at N / ~N {}
33
// ----
4-
// TypeError 6396: (44-50): The base slot of the storage layout must evaluate to a rational number.
4+
// TypeError 3667: (48-50): Arithmetic error when computing constant value.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
uint constant N = 100;
22
contract C layout at N / 0 {}
33
// ----
4-
// TypeError 6396: (44-49): The base slot of the storage layout must evaluate to a rational number.
4+
// TypeError 1505: (44-49): The base slot expression contains elements that are not yet supported by the internal constant evaluator and therefore cannot be evaluated at compilation time.

0 commit comments

Comments
 (0)