Skip to content

Sema: Associated type inference skips witnesses that might trigger a request cycle #69826

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
Nov 14, 2023

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Nov 13, 2023

This implements a structural walk over the TypeRepr to catch situations where we attempt to infer A from func f(_: A), which references the concrete A that will be synthesized in the conforming type.

Fixes:

@slavapestov slavapestov force-pushed the assoc-type-inference-cycle branch 2 times, most recently from be87c2c to 3b78215 Compare November 14, 2023 04:26
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

…request cycle

This implements a structural walk over the TypeRepr to catch
situations where we attempt to infer `A` from `func f(_: A)`,
which references the concrete `A` that will be synthesized
in the conforming type.

Fixes:
- rdar://34956654 / swiftlang#48680
- rdar://38913692 / swiftlang#49066
- rdar://56672411
- swiftlang#50010
- rdar://81587765 / swiftlang#57355
- rdar://117442510
@slavapestov slavapestov force-pushed the assoc-type-inference-cycle branch from 3b78215 to 96432e6 Compare November 14, 2023 17:14
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant