File tree Expand file tree Collapse file tree 3 files changed +90
-0
lines changed
test/cmdlineTests/storage_base_location_defined_ancestor Expand file tree Collapse file tree 3 files changed +90
-0
lines changed Original file line number Diff line number Diff line change
1
+ //SPDX-License-Identifier: GPL-3.0
2
+ pragma solidity >= 0.0 ;
3
+ contract A layout at 0x1234 {
4
+ }
5
+
6
+ contract B is A {
7
+ }
8
+
9
+ contract C layout at 0x1234 is B {
10
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "language" : " Solidity" ,
3
+ "sources" : {
4
+ "fileA" : {"urls" : [" storage_base_location_defined_ancestor/in.sol" ]}
5
+ },
6
+ "settings" : {
7
+ "outputSelection" : {
8
+ "fileA" : { "A" : [" *" ] }
9
+ }
10
+ }
11
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "errors" : [
3
+ {
4
+ "component" : " general" ,
5
+ "errorCode" : " 8894" ,
6
+ "formattedMessage" : "TypeError: Storage base location can only be specified in the most derived contract.
7
+ --> fileA:6:1:
8
+ |
9
+ 6 | contract B is A {
10
+ | ^ (Relevant source part starts here and spans across multiple lines).
11
+ Note: Storage base location was already specified here.
12
+ --> fileA:3:22:
13
+ |
14
+ 3 | contract A layout at 0x1234 {
15
+ | ^^^^^^
16
+
17
+ ",
18
+ "message" : " Storage base location can only be specified in the most derived contract." ,
19
+ "secondarySourceLocations" : [
20
+ {
21
+ "end" : 85 ,
22
+ "file" : " fileA" ,
23
+ "message" : " Storage base location was already specified here." ,
24
+ "start" : 79
25
+ }
26
+ ],
27
+ "severity" : " error" ,
28
+ "sourceLocation" : {
29
+ "end" : 110 ,
30
+ "file" : " fileA" ,
31
+ "start" : 91
32
+ },
33
+ "type" : " TypeError"
34
+ },
35
+ {
36
+ "component" : " general" ,
37
+ "errorCode" : " 8894" ,
38
+ "formattedMessage" : "TypeError: Storage base location can only be specified in the most derived contract.
39
+ --> fileA:9:1:
40
+ |
41
+ 9 | contract C layout at 0x1234 is B {
42
+ | ^ (Relevant source part starts here and spans across multiple lines).
43
+ Note: Storage base location was already specified here.
44
+ --> fileA:3:22:
45
+ |
46
+ 3 | contract A layout at 0x1234 {
47
+ | ^^^^^^
48
+
49
+ ",
50
+ "message" : " Storage base location can only be specified in the most derived contract." ,
51
+ "secondarySourceLocations" : [
52
+ {
53
+ "end" : 85 ,
54
+ "file" : " fileA" ,
55
+ "message" : " Storage base location was already specified here." ,
56
+ "start" : 79
57
+ }
58
+ ],
59
+ "severity" : " error" ,
60
+ "sourceLocation" : {
61
+ "end" : 148 ,
62
+ "file" : " fileA" ,
63
+ "start" : 112
64
+ },
65
+ "type" : " TypeError"
66
+ }
67
+ ],
68
+ "sources" : {}
69
+ }
You can’t perform that action at this time.
0 commit comments