Skip to content

[Completion] Add convertible type relation for attached macros #65515

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

Merged
merged 1 commit into from
May 1, 2023

Conversation

bnbarham
Copy link
Contributor

Resolves rdar://108678938.

@bnbarham
Copy link
Contributor Author

@swift-ci please test

// NOMINAL_ATTR-DAG: Decl[Macro]/{{.*}}: AttachedPeerMacro[#Void#]; name=AttachedPeerMacro
// NOMINAL_ATTR-DAG: Decl[Macro]/{{.*}}: AttachedConformanceMacro[#Void#]; name=AttachedConformanceMacro
// NOMINAL_ATTR-DAG: Decl[Macro]/{{.*}}: EverythingMacro[#Void#]; name=EverythingMacro
// NOMINAL_ATTR-DAG: Decl[Macro]/{{.*}}/TypeRelation[Convertible]: AttachedMemberMacro[#Void#]; name=AttachedMemberMacro
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO that’s why we shouldn’t wildcard match anything after Decl[Macro] but always be explicit about relations etc. You don’t need to change it in this PR though.

Copy link
Contributor Author

@bnbarham bnbarham Apr 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue here is that module is before type relation and this test does both in-module and cross-module completions. IMO we should move type relation before the location of the completion. I could of course regex match the current module/other module but... it's really not all that important to this test.

@bnbarham bnbarham force-pushed the add-attached-type-relation branch from 8d09160 to f7d1cc8 Compare April 28, 2023 23:16
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor Author

@swift-ci please test macOS platform

@bnbarham bnbarham merged commit 3368e71 into swiftlang:main May 1, 2023
@bnbarham bnbarham deleted the add-attached-type-relation branch May 1, 2023 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants