Skip to content

[CS] Walk UnresolvedDeclRefExprs in UnresolvedVarCollector #67332

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
Jul 18, 2023

Conversation

hamishknight
Copy link
Contributor

@hamishknight hamishknight commented Jul 17, 2023

This matches what we do in VarRefCollector, and is needed because we currently delay the pre-checking of patterns due to the fact that we don't resolve them until CSGen. We ought to consider changing this, but until then, adjust the logic here to ensure we properly connect an ExprPattern that references an outer var with any type variables it may involve.

Then, we can merge the implementations of VarRefCollector & UnresolvedVarCollector since they now do the same thing.

rdar://112264204

@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight
Copy link
Contributor Author

@swift-ci please test source compatibility

This matches what we do in VarRefCollector, and is
needed because we currently delay the pre-checking
of patterns due to the fact that we don't resolve
them until CSGen. We ought to consider changing
this, but until then, adjust the logic here to
ensure we properly connect an ExprPattern that
references an outer var with any type variables
it may involve.

rdar://112264204
These now do basically the same thing, merge their
implementations.
@hamishknight
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
Development

Successfully merging this pull request may close these issues.

2 participants