New issue
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
[SR-4834] Static should be attribute.builtin #47411
Comments
This is because `static` is a language keyword while the others are not, for example: let override = 1 // works |
I can understand |
That is an interesting question that I'd suggest bringing up on swift-dev, but I'd like to clarify that what sourcekitd reports is expected behavior, based on the language keywords, not a bug. |
I did. Nobody responded. |
In the email you ask 'why sourceKit is reporting `static` as a "source.lang.swift.syntaxtype.keyword"', and the answer is because 'static' is a language keyword, as I mentioned here. If you think it should not be a keyword, then that is a different question, targeted towards the language rules. |
thats fair. Closing. |
Environment
Welcome to Apple Swift version 3.1 (swiftlang-802.0.51 clang-802.0.41). Type :help for assistance.
Additional Detail from JIRA
md5: 8727462403ffc22f9f6eeaa352343c60
Issue Description:
AFAICT, All modifiers are represented in Sourcekit as
source.lang.swift.syntaxtype.attribute.builtin
except static.static comes up as
source.lang.swift.syntaxtype.keyword
This seems to be a bug since
static
seems to be just another modifier in this list. https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Declarations.html#//apple_ref/swift/grammar/declaration-modifiersThe text was updated successfully, but these errors were encountered: