-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix missing indexing data with overloaded type #65729
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
Fix missing indexing data with overloaded type #65729
Conversation
When you have a type that's ambiguous because it's defined in 2 imported modules, but you don't have to disambiguate by using the module name, previously no index references were produced. Now most are for the common case, but notably nested type constructors and generics still aren't emitted, partially because of swiftlang#65726 Fixes: swiftlang#64598
@swift-ci please test |
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it makes sense to add a new TypeRepr for Self
, especially since it appears to only be used in preCheckExpr(). TypeReprs are syntactic constructs and Self
is not special in any way as far as the syntax is concerned.
Why does indexing look at TypeReprs at all?
As far as I understand it we index various type references through |
@swift-ci please test linux platform |
Friendly bump |
@slavapestov IMO the existing logic that uses a FixedTypeRepr for this is wrong since, as I understand it, it really should only be used when we need to synthesize a TypeRepr to represent a Type that isn't spelled in the source.
As I understand it, we care not only what Type is being used, but also how it is spelled in source. e.g |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modulo the two comments I've left, this LGTM! (sorry for the late review)
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I concur with @hamishknight comments, this looks good to me too!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
When you have a type that's ambiguous because it's defined in 2 imported modules, but you don't have to disambiguate by using the module name, previously no index references were produced. Now most are for the common case, but notably nested type constructors and generics still aren't emitted, partially because of #65726 Fixes: #64598 (cherry picked from commit e9ff334 / #65729)
When you have a type that's ambiguous because it's defined in 2 imported modules, but you don't have to disambiguate by using the module name, previously no index references were produced. Now most are for the common case, but notably nested type constructors and generics still aren't emitted, partially because of #65726
Fixes: #64598