Skip to content

Commit 7f4eb69

Browse files
Add test
1 parent 94efd53 commit 7f4eb69

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
contract A layout at 3/2 {}
2+
// ----
3+
// TypeError 76: (21-24): Contract storage base location cannot be specified by a fractional number.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
uint constant X = 42;
22
contract C layout at 0xffff * (50 - X) { }
33
// ----
4+
// TypeError 42: (43-60): Only number literals are accepted in the expression specifying the contract base storage location.

test/libsolidity/syntaxTests/contractBaseLocation/simple_layout.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ contract A layout at 0x1234 {}
22
contract B layout at 1024 {}
33
contract C layout at "C" {}
44
// ----
5+
// TypeError 76: (81-84): Contract storage base location must be in range of type uint256. Current type is literal_string "C"

0 commit comments

Comments
 (0)