Skip to content
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

Remove a couple of over-eager assertions #65177

Merged

Conversation

rjmccall
Copy link
Contributor

@rjmccall rjmccall commented Apr 14, 2023

The best substitutions we can easily find in nested functions for captured local variables are the forwarding substitutions of the current environment. These should be fine for type-substitution purposes but do not necessarily match the generic signature of the original variable's environment, which can trip these assertions. Unfortunately, I can't think of an easy way to weaken these assertions sufficiently to cover this case.

This should fix the source-compat suite regression reported in rdar://107642925.

Resolves #65200, resolves #65083.

The best substitutions we can easily find in nested functions for
captured local variables are the forwarding substitutions of the
current environment.  These should be fine for type-substitution
purposes but do not necessarily match the generic signature of the
original variable's environment, which can trip these assertions.
Unfortunately, I can't think of an easy way to weaken these
assertions sufficiently to cover this case.

This should fix the source-compat suite regression reported in
rdar://107642925.
@rjmccall
Copy link
Contributor Author

@swift-ci Please 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