Skip to content

AST: Fix SequenceExpr handling in AvailabilityScopeBuilder #78706

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
Jan 18, 2025

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented Jan 17, 2025

Since availability scopes may be built at arbitrary times, the builder may encounter ASTs where SequenceExprs still exist and have not been folded, or it may encounter folded SequenceExprs that have not been removed from the AST.

To avoid a double visit, track whether a SequenceExpr is folded and then customize how ASTVisitor handles folded sequences.

Resolves rdar://142824799 and #78567.

@tshortli
Copy link
Contributor Author

@swift-ci please test

@tshortli tshortli force-pushed the sequence-expr-availability-scopes branch from c269d4b to b050665 Compare January 17, 2025 18:20
Since availability scopes may be built at arbitrary times, the builder may
encounter ASTs where SequenceExprs still exist and have not been folded, or it
may encounter folded SequenceExprs that have not been removed from the AST.

To avoid a double visit, track whether a SequenceExpr is folded and then
customize how ASTVisitor handles folded sequences.

Resolves rdar://142824799 and swiftlang#78567.
@tshortli tshortli force-pushed the sequence-expr-availability-scopes branch from b050665 to 87308e3 Compare January 17, 2025 18:21
@tshortli tshortli marked this pull request as ready for review January 17, 2025 18:21
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test

@tshortli
Copy link
Contributor Author

swiftlang/swift-docc#1145

@swift-ci please smoke test Linux

@tshortli tshortli enabled auto-merge January 17, 2025 23:47
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test Linux

@tshortli tshortli merged commit 1d6f8ef into swiftlang:main Jan 18, 2025
3 checks passed
@tshortli tshortli deleted the sequence-expr-availability-scopes branch January 18, 2025 17:17
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.

Compiler crash with message "overlapping children"
2 participants