Skip to content

Move-only-check the yielded result from read coroutines when they're noncopyable. #70333

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

jckarter
Copy link
Contributor

@jckarter jckarter commented Dec 8, 2023

Mark the result of starting a read coroutine to be checked by the move-only checker, and then update the pattern matching in the move checker itself so that it recognizes code patterns involving yielding from and receiving yields from read coroutines. Teach move only diagnostics to get the property name for an access through a read coroutine from the referenced declaration.

@jckarter
Copy link
Contributor Author

jckarter commented Dec 8, 2023

@swift-ci Please test

…noncopyable.

Mark the result of starting a read coroutine to be checked by the move-only checker, and then
update the pattern matching in the move checker itself so that it recognizes code patterns
involving yielding from and receiving yields from read coroutines. Teach move only diagnostics
to get the property name for an access through a read coroutine from the referenced declaration.
@jckarter jckarter force-pushed the read-coroutines-yielding-noncopyable-values branch from a72417d to 96c87db Compare December 11, 2023 18:55
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter
Copy link
Contributor Author

@swift-ci Please test Linux

1 similar comment
@jckarter
Copy link
Contributor Author

@swift-ci Please test Linux

@jckarter jckarter merged commit a0b1330 into swiftlang:main Dec 12, 2023
jckarter added a commit to jckarter/swift that referenced this pull request Dec 12, 2023
Following swiftlang#70333, do the same thing for
modify coroutines, marking the result so that we check uses of the result to
ensure it isn't consumed (without being reinitialized).
Catfish-Man pushed a commit to Catfish-Man/swift that referenced this pull request Jan 19, 2024
Following swiftlang#70333, do the same thing for
modify coroutines, marking the result so that we check uses of the result to
ensure it isn't consumed (without being reinitialized).
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.

1 participant