Skip to content

Allow local archetypes in interface types of local declarations #73570

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

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented May 10, 2024

This is a follow-up to #73393. This cleans up some logic for variables inside pack iteration for loops in preparation for variables whose types contain element archetypes becoming a more general thing.

The existing hasArchetype() is now deprecated. It is equivalent to:

    hasPrimaryArchetype() || hasLocalArchetype()

Callers should be changed to check one or both of the above predicates
in the most precise way possible.
@@ -9370,35 +9370,6 @@ static std::optional<PackIterationInfo> applySolutionToForEachStmt(
std::optional<SyntacticElementTarget>(SyntacticElementTarget)>
rewriteTarget) {

// A special walker to record opened element environment for var decls in a
// for-each loop.
class Walker : public ASTWalker {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for getting rid of this!👏🏻

@slavapestov slavapestov force-pushed the pack-expansion-closures-part-4 branch from 8e5d947 to 7e36060 Compare May 10, 2024 21:22
@slavapestov slavapestov changed the title Pack expansion closures, part 4 Allow local archetypes in interface types of local declarations May 10, 2024
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov marked this pull request as ready for review May 10, 2024 21:25
@slavapestov slavapestov requested review from hborla and xedin as code owners May 10, 2024 21:25
@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov merged commit 6df0de5 into swiftlang:main May 11, 2024
3 of 5 checks passed
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