Wrong implementation of yield/yield* in dartdevk #49621
Labels
area-web-js
Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.
dev-compiler-async
P2
A bug or feature request we're likely to work on
web-dev-compiler
Uh oh!
There was an error while loading. Please reload this page.
dartdevk doesn't implement
yield/yield*
behavior described in https://github.com/dart-lang/language/blob/master/accepted/future-releases/async-star-behavior/feature-specification.mdThere are several issues.
yield/yield*
and stream is cancelled, thenyield*
should act like areturn;
statement. But it isn't so and it causes failure of the following co19 testsco19/Language/Statements/Yield_and_Yield_Each/Yield/execution_async_A03_t01
co19/Language/Statements/Yield_and_Yield_Each/Yield/execution_async_A03_t01
co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_A03_t07
co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_A03_t08
co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_A03_t09
await for (var event in stream) ..
. loop first listens on the iterated stream, then for each data event, it executes the body. If the body performs any asynchronous operation (that is, it does not complete synchronously because it executes anyawait
,wait for
oryield*
operation, or it blocks at ayield
), then the stream subscription must be paused. It is resumed again when the body completes normally. But it isn't so and it causes failure ofco19/Language/Statements/Yield_and_Yield_Each/Yield/execution_async_A05_t02
yield
. See failures ofco19/Language/Statements/Yield_and_Yield_Each/Yield/execution_async_A01_t01
co19/Language/Statements/Yield_and_Yield_Each/Yield/execution_async_A01_t02
co19/Language/Statements/Yield_and_Yield_Each/Yield/execution_async_A01_t03
co19/Language/Statements/Yield_and_Yield_Each/Yield/execution_async_A01_t04
co19/Language/Statements/Yield_and_Yield_Each/Yield/execution_async_A01_t05
co19/Language/Statements/Yield_and_Yield_Each/Yield/execution_async_A01_t06
co19/Language/Statements/Yield_and_Yield_Each/Yield/execution_async_A01_t07
co19/Language/Statements/Yield_and_Yield_Each/Yield/execution_async_A01_t08
See full log at https://dart-ci.firebaseapp.com/cl/253664/1
The text was updated successfully, but these errors were encountered: