Files
sdk/pkg/front_end/testcases/patterns/issue52228.dart
T
Chloe Stefantsova 0822573589 [cfe] Report await-for in non-async functions for patterns too
Closes https://github.com/dart-lang/sdk/issues/52228

Change-Id: I7cb48a39ce2e51f0d9405e9e829d01f0e3209073
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300620
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-05-03 06:12:27 +00:00

10 lines
322 B
Dart

// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
test() {
await for (var [v1] in Stream.fromIterable([[1], [2], [3]])) { // Error.
print(v1);
}
}