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

Swift: dataflow for for-in loops #13909

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

rdmarsh2
Copy link
Contributor

@rdmarsh2 rdmarsh2 commented Aug 7, 2023

No description provided.

@rdmarsh2
Copy link
Contributor Author

rdmarsh2 commented Aug 7, 2023

This is built on top of #13838 - only the last two commits are new

Copy link
Contributor

@geoffw0 geoffw0 left a comment

Choose a reason for hiding this comment

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

This is pleasingly straightforward!

I'd like to see iteration through CollectionElement supported + tested in addition to ArrayContent.

for entry in arr7
{
sink(arg: entry) // $ flow=696
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I doubt it will affect flow, but it might also be nice to have one test in the alternative form:

arr7.forEach { entry in
	sink(arg: entry) // $ flow=
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants