Skip to content

[5.5][Diagnostics] Make sure extension type repr is available before using it #37925

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
Jun 17, 2021

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jun 15, 2021

Cherry-pick of #37887


  • Explanation:

Before suggesting to add where Self == ... condition to the extension
of a protocol involved in a static member lookup, let's check whether
type repr is available and valid.

  • Scope: Incorrect expressions that use static member lookup in generic context feature
    but don't have appropriate extension declared (extension with concrete Self requirement).

  • Main Branch PR: [Diagnostics] Make sure extension type repr is available before using it #37887

  • Resolves: rdar://78097387

  • Risk: Low

  • Reviewed By: @hborla

  • Testing: Unfortunately no tests have been added because the issue has to do with serialized modules
    which is hard to test, but it's just a nullptr check so it shouldn't be a problem.

Resolves: rdar://78097387
(cherry picked from commit a7988b0)

@xedin xedin added the r5.5 label Jun 15, 2021
@xedin xedin requested a review from a team as a code owner June 15, 2021 17:15
@xedin
Copy link
Contributor Author

xedin commented Jun 15, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 6dcf5ffd0a5e7f9cc4c8458036e744864ecdf1fa

Before suggesting to add `where Self == ...` condition to the extension
of a protocol involved in a static member lookup, let's check whether
type repr is available and valid.

Resolves: rdar://78097387
(cherry picked from commit a7988b0)
@xedin xedin force-pushed the rdar-78097387-5.5 branch from 6dcf5ff to 3af5e70 Compare June 15, 2021 18:07
@xedin
Copy link
Contributor Author

xedin commented Jun 15, 2021

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Jun 16, 2021

@swift-ci please test Windows platform

@tkremenek tkremenek merged commit 693e420 into swiftlang:release/5.5 Jun 17, 2021
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants