-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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-13857] indexstore missing references for superclass / protocol when using composition #56255
Comments
Turns out you don't actually need the type alias here, using this code has the same issue: class ZZ1 {}
protocol Protocol {}
class Subclass: ZZ1 & Protocol {} |
@swift-ci create |
I'd be happy to take a stab at this if someone could offer some guidance! |
Interesting, as you pointed out it's not the typealias the problem, it's that it uses composition. The code is in |
Thanks for the tip! I got to it eventually! 🙃 #64997 |
Previously the index data differed when using `Foo, Bar` vs `Foo & Bar`. Fixes swiftlang#56255
Previously the index data differed when using `Foo, Bar` vs `Foo & Bar`. Fixes swiftlang#56255
Previously the index data differed when using `Foo, Bar` vs `Foo & Bar`. Fixes swiftlang#56255
Previously the index data differed when using `Foo, Bar` vs `Foo & Bar`. Fixes swiftlang#56255 (cherry picked from commit 7a5e9dc / swiftlang#64997)
take 2 after a revert #65550 |
Previously the index data differed when using `Foo, Bar` vs `Foo & Bar`. Fixes swiftlang#56255 (cherry picked from commit 6c2ccb4)
Attachment: Download
Environment
Xcode 12.2 (12B45b)
Additional Detail from JIRA
md5: 3d2406440cd5302076477f42903a56d5
Issue Description:
With this code:
The index store produced by building does not contain references from Subclass to ZZ1 as the superclass, or Protocol. This causes Xcode to not display the superclasses / protocol connections in the UI, and also impacts custom tooling built on index store data.
The difference is specifically a few symbols. With this code:
You have this (normalized for display) reference which is missing when building the original snippet:
s:10superclass3ZZ1C baseOf s:10superclass8SubclassC
If you use this code:
You end up with both the reference to the superclass, and a protocol reference:
s:10superclass8ProtocolP baseOf s:10superclass8SubclassC
.Attached are the screenshots of how this ends up affecting Xcode's UI
The text was updated successfully, but these errors were encountered: