-
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
fca7d3f
commit 8b303fb
Showing
3 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
test/cmdlineTests/storage_base_location_defined_ancestor/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 layout at 0x1234 { | ||
} | ||
|
||
contract B is A { | ||
} | ||
|
||
contract C layout at 0x1234 is B { | ||
} |
11 changes: 11 additions & 0 deletions
11
test/cmdlineTests/storage_base_location_defined_ancestor/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_defined_ancestor/in.sol"]} | ||
}, | ||
"settings": { | ||
"outputSelection": { | ||
"fileA": { "A": ["*"] } | ||
} | ||
} | ||
} |
69 changes: 69 additions & 0 deletions
69
test/cmdlineTests/storage_base_location_defined_ancestor/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,69 @@ | ||
{ | ||
"errors": [ | ||
{ | ||
"component": "general", | ||
"errorCode": "8894", | ||
"formattedMessage": "TypeError: Storage base location can only be specified in the most derived contract. | ||
--> fileA:6:1: | ||
| | ||
6 | contract B is A { | ||
| ^ (Relevant source part starts here and spans across multiple lines). | ||
Note: Storage base location was already specified here. | ||
--> fileA:3:22: | ||
| | ||
3 | contract A layout at 0x1234 { | ||
| ^^^^^^ | ||
|
||
", | ||
"message": "Storage base location can only be specified in the most derived contract.", | ||
"secondarySourceLocations": [ | ||
{ | ||
"end": 85, | ||
"file": "fileA", | ||
"message": "Storage base location was already specified here.", | ||
"start": 79 | ||
} | ||
], | ||
"severity": "error", | ||
"sourceLocation": { | ||
"end": 110, | ||
"file": "fileA", | ||
"start": 91 | ||
}, | ||
"type": "TypeError" | ||
}, | ||
{ | ||
"component": "general", | ||
"errorCode": "8894", | ||
"formattedMessage": "TypeError: Storage base location can only be specified in the most derived contract. | ||
--> fileA:9:1: | ||
| | ||
9 | contract C layout at 0x1234 is B { | ||
| ^ (Relevant source part starts here and spans across multiple lines). | ||
Note: Storage base location was already specified here. | ||
--> fileA:3:22: | ||
| | ||
3 | contract A layout at 0x1234 { | ||
| ^^^^^^ | ||
|
||
", | ||
"message": "Storage base location can only be specified in the most derived contract.", | ||
"secondarySourceLocations": [ | ||
{ | ||
"end": 85, | ||
"file": "fileA", | ||
"message": "Storage base location was already specified here.", | ||
"start": 79 | ||
} | ||
], | ||
"severity": "error", | ||
"sourceLocation": { | ||
"end": 148, | ||
"file": "fileA", | ||
"start": 112 | ||
}, | ||
"type": "TypeError" | ||
} | ||
], | ||
"sources": {} | ||
} |