Skip to content

Commit

Permalink
Refactor: storage base location -> storage layout
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusaaguiar committed Feb 6, 2025
1 parent 816a8f9 commit f4ddc29
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### 0.8.29 (unreleased)

Language Features:
* Introduce syntax for specifying contract storage base location.
* Introduce syntax for specifying contract storage layout base.


Compiler Features:
Expand Down
4 changes: 2 additions & 2 deletions libsolidity/parsing/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ ASTPointer<ContractDefinition> Parser::parseContractDefinition()
m_errorReporter.parserError(
8714_error,
m_scanner->currentLocation(),
SecondarySourceLocation().append("Another base location was defined here", storageLayoutSpecifier->location()),
"Storage base location was already defined previously."
SecondarySourceLocation().append("Another storage layout was defined here", storageLayoutSpecifier->location()),
"Storage layout was already defined previously."
);

storageLayoutSpecifier = parseStorageLayoutSpecifier();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
{
"component": "general",
"errorCode": "8714",
"formattedMessage": "ParserError: Storage base location was already defined previously.
"formattedMessage": "ParserError: Storage layout was already defined previously.
--> fileA:5:34:
|
5 | contract C layout at 0x1234 is A layout at 0xABCD {
| ^^^^^^
Note: Another base location was defined here
Note: Another storage layout was defined here
--> fileA:5:12:
|
5 | contract C layout at 0x1234 is A layout at 0xABCD {
| ^^^^^^^^^^^^^^^^

",
"message": "Storage base location was already defined previously.",
"message": "Storage layout was already defined previously.",
"secondarySourceLocations": [
{
"end": 100,
"file": "fileA",
"message": "Another base location was defined here",
"message": "Another storage layout was defined here",
"start": 84
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
contract C layout at 0x1234 is A, B layout at 0xABC { }
// ----
// ParserError 8714: (36-42): Storage base location was already defined previously.
// ParserError 8714: (36-42): Storage layout was already defined previously.

0 comments on commit f4ddc29

Please # to comment.