Skip to content

Commit

Permalink
fixup! add cmdline tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusaaguiar committed Jan 17, 2025
1 parent a3265f0 commit 0fa3be8
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
contract A {
}
contract C layout at 0x1234 is A layout at 0xABCD {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"language": "Solidity",
"sources": {
"fileA": {"urls": ["storage_base_location_repeated_definition_error/in.sol"]}
},
"settings": {
"outputSelection": {
"fileA": { "*": ["*"], "": [ "*" ] }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"errors": [
{
"component": "general",
"errorCode": "8714",
"formattedMessage": "ParserError: Storage base location 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
--> fileA:5:22:
|
5 | contract C layout at 0x1234 is A layout at 0xABCD {
| ^^^^^^

",
"message": "Storage base location was already defined previously.",
"secondarySourceLocations": [
{
"end": 100,
"file": "fileA",
"message": "Another base location was defined here",
"start": 94
}
],
"severity": "error",
"sourceLocation": {
"end": 112,
"file": "fileA",
"start": 106
},
"type": "ParserError"
}
],
"sources": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
contract A {
}

contract B {
}

contract C is A is B {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"language": "Solidity",
"sources": {
"fileA": {"urls": ["storage_base_location_repeated_inheritance_definition_error/in.sol"]}
},
"settings": {
"outputSelection": {
"fileA": { "*": ["*"], "": [ "*" ] }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"errors": [
{
"component": "general",
"errorCode": "6668",
"formattedMessage": "ParserError: Base contracts were already defined previously.
--> fileA:9:17:
|
9 | contract C is A is B {
| ^^
Note: First inheritance definition is here
--> fileA:9:15:
|
9 | contract C is A is B {
| ^

",
"message": "Base contracts were already defined previously.",
"secondarySourceLocations": [
{
"end": 105,
"file": "fileA",
"message": "First inheritance definition is here",
"start": 104
}
],
"severity": "error",
"sourceLocation": {
"end": 108,
"file": "fileA",
"start": 106
},
"type": "ParserError"
}
],
"sources": {}
}

0 comments on commit 0fa3be8

Please sign in to comment.