Skip to content

TypeResolution: Stop resolving unqualified protocol type aliases to DependentMemberType in structural stage #79322

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 2 commits into from
Feb 14, 2025

Conversation

AnthonyLatsis
Copy link
Collaborator

@AnthonyLatsis AnthonyLatsis commented Feb 12, 2025

This workaround is no longer needed because TypeAliasType is now modeled using generic arguments vs. a substitution map. Previously, computing the substitution map in StructuralTypeRequest to construct the resulting TypeAliasType could cause a request cycle around generic signature computation.

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test Linux

@slavapestov
Copy link
Contributor

(FWIW: this is only for unqualified references to protocol type aliases. Something like T.Foo remains a DMT in structural stage, because we don't know what protocols T conforms to, etc.)

@slavapestov
Copy link
Contributor

Also let's run source compat for changes like this!

@slavapestov
Copy link
Contributor

@swift-ci Please test source compatibility

@AnthonyLatsis AnthonyLatsis changed the title TypeResolution: Stop resolving protocol type aliases to DependentMemberType in structural stage TypeResolution: Stop resolving unqualified protocol type aliases to DependentMemberType in structural stage Feb 12, 2025
…DependentMemberType` in structural stage

This workaround is no longer needed because `TypeAliasType` is now
modeled using generic arguments (as opposed to a substitution map).
Previously, computing the substitution map in `StructuralTypeRequest` to
construct the resulting `TypeAliasType` could cause a request cycle
around generic signature computation.
@AnthonyLatsis AnthonyLatsis force-pushed the charcharadon-carcharias branch from 5edc3c0 to f3183be Compare February 13, 2025 01:23
@AnthonyLatsis
Copy link
Collaborator Author

Source compat succeeded: https://ci.swift.org/job/swift-PR-source-compat-suite-macos/2193/

Force-pushing to amend commit message.

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test Windows

@AnthonyLatsis AnthonyLatsis merged commit 0877aa1 into swiftlang:main Feb 14, 2025
3 checks passed
@AnthonyLatsis AnthonyLatsis deleted the charcharadon-carcharias branch February 14, 2025 03:36
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.

2 participants