File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Sources/SourceKitLSP/Swift Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -122,14 +122,22 @@ package enum ReferenceDocumentURL {
122
122
var buildSettingsFile : DocumentURI {
123
123
switch self {
124
124
case . macroExpansion( let data) : return data. primaryFile
125
- case . generatedInterface( let data) : return data. buildSettingsFrom
125
+ case . generatedInterface( let data) :
126
+ if let referenceDocumentURL = try ? ReferenceDocumentURL ( from: data. buildSettingsFrom) {
127
+ return referenceDocumentURL. buildSettingsFile
128
+ }
129
+ return data. buildSettingsFrom
126
130
}
127
131
}
128
132
129
133
var primaryFile : DocumentURI ? {
130
134
switch self {
131
135
case . macroExpansion( let data) : return data. primaryFile
132
- case . generatedInterface( let data) : return data. buildSettingsFrom. primaryFile
136
+ case . generatedInterface( let data) :
137
+ if let referenceDocumentURL = try ? ReferenceDocumentURL ( from: data. buildSettingsFrom) {
138
+ return referenceDocumentURL. primaryFile
139
+ }
140
+ return data. buildSettingsFrom. primaryFile
133
141
}
134
142
}
135
143
}
You can’t perform that action at this time.
0 commit comments