Skip to content

[CS] Connect isolated conjunctions to referenced VarDecls #63456

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
Feb 6, 2023

Conversation

hamishknight
Copy link
Contributor

Currently we only consider ParamDecls, but isolated conjunctions can reference external VarDecls too.

This fixes a spurious "cannot reference invalid declaration" error when the result builder transform is disabled in the test case rdar104687668.swift. It also fixes the attached test case, where an if expression references a pattern var in a for loop.

rdar://105080067

Currently we only consider ParamDecls, but isolated
conjunctions can reference external VarDecls too.

This fixes a spurious "cannot reference invalid declaration"
error when the result builder transform is disabled
in the test case rdar104687668.swift. It also fixes
the attached test case, where an if expression
references a pattern var in a for loop.

rdar://105080067
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight
Copy link
Contributor Author

@swift-ci please test source compatibility

@hamishknight hamishknight merged commit acff9ee into swiftlang:main Feb 6, 2023
@hamishknight hamishknight deleted the connect-var branch February 6, 2023 19:58
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