-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3265f0
commit 0fa3be8
Showing
6 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
test/cmdlineTests/storage_base_location_repeated_definition_error/in.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
} |
11 changes: 11 additions & 0 deletions
11
test/cmdlineTests/storage_base_location_repeated_definition_error/input.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": { "*": ["*"], "": [ "*" ] } | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
test/cmdlineTests/storage_base_location_repeated_definition_error/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": {} | ||
} |
10 changes: 10 additions & 0 deletions
10
test/cmdlineTests/storage_base_location_repeated_inheritance_definition_error/in.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
} |
11 changes: 11 additions & 0 deletions
11
test/cmdlineTests/storage_base_location_repeated_inheritance_definition_error/input.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": { "*": ["*"], "": [ "*" ] } | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
test/cmdlineTests/storage_base_location_repeated_inheritance_definition_error/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": {} | ||
} |