Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusaaguiar committed Dec 10, 2024
1 parent d389730 commit 82b5fec
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
contract A layout at 0x1234 {}

contract B is A {}

contract C is B layout at 0xABCD {}
// ----
// TypeError 8894: (32-50): Storage base location can only be specified in the most derived contract.
// TypeError 8894: (52-87): Storage base location can only be specified in the most derived contract.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
contract A layout at 0x1234 {}

contract B is A {}

contract C is B {}
// ----
// TypeError 8894: (32-50): Storage base location can only be specified in the most derived contract.
// TypeError 8894: (52-70): Storage base location can only be specified in the most derived contract.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function f(uint x) returns (uint) { return x + 1; }
contract A layout at f(2) {}
// ----
// TypeError 1139: (73-77): The contract base location must be an expression that can be evaluated at compilation time.
// TypeError 6396: (73-77): Only number literals are accepted in the expression specifying the contract base storage location.

0 comments on commit 82b5fec

Please sign in to comment.