We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS 10.15.4
Xcode 10.2.1 as well as Xcode 11.5
md5: 822f9405b013863a0c634800f0f61bb8
Issue Description:
Examples:
struct gg<G: T<Int>> {} // "key.inheritedtypes > key.name" is "T<Int>>" func bg<T: G<Void>>() // "key.inheritedtypes > key.name" is "G<Void>>"
This doesn't occur unless the inherited type is generic as well. It also only applies to the last inherited type, so for
<T, U: G<T>, V: G<U>>
only the inherited type `G<U>` is returned by SourceKit as `G<U>>`.
Also, this bug can be sidestepped by adding a space before the last `>`. So adding a space to the previous example
<T, U: G<T>, V: G<U> >
correctly returns just `G<U>` as the inherited type.
I suspect an off-by-one bug when fetching the inheritance type from the source code.
The text was updated successfully, but these errors were encountered:
Comment by Matty Cross (JIRA)
This bug is also discussed here, where a structure of an example can be seen with incorrect type name as well as the offset and length.
Sorry, something went wrong.
@swift-ci create
Friendly reminder that for syntactic processing of files, SwiftSyntax is a much better tool to use than sourcekitd's structure response.�
@akyrtzi Thanks for the suggestion. I actually didn't know there were other Swift parsing tools, I'll check it out.
No branches or pull requests
Environment
macOS 10.15.4
Xcode 10.2.1 as well as Xcode 11.5
Additional Detail from JIRA
md5: 822f9405b013863a0c634800f0f61bb8
Issue Description:
Examples:
This doesn't occur unless the inherited type is generic as well. It also only applies to the last inherited type, so for
only the inherited type `G<U>` is returned by SourceKit as `G<U>>`.
Also, this bug can be sidestepped by adding a space before the last `>`. So adding a space to the previous example
correctly returns just `G<U>` as the inherited type.
I suspect an off-by-one bug when fetching the inheritance type from the source code.
The text was updated successfully, but these errors were encountered: