We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50964b2 commit 439c808Copy full SHA for 439c808
Language/Statements/For/Asynchronous_For_in/execution_t04.dart
@@ -68,9 +68,11 @@ Future test2() async {
68
69
// try an already closed single subscription stream
70
Future test3() async {
71
- // make a stream that is closed
72
- Stream stream = new Stream.fromIterable([1, 2]);
73
- await for (var x in stream) {
+ Stream<int> generator() async* {
+ yield 42;
+ }
74
+ Stream stream = generator();
75
+ await for (var i in stream) {
76
}
77
var processedValues = [];
78
try {
@@ -87,7 +89,6 @@ Future test3() async {
87
89
Expect.isTrue(processedValues.isEmpty);
88
90
91
-
92
main() {
93
asyncStart();
94
Future.wait([test1(), test2(), test3()]).then((v) => asyncEnd());
0 commit comments