blob: c5f711c2849e31091374d75817784be3edb02539 [file] [log] [blame]
// Copyright (c) 2018, 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.
// @dart = 2.9
/// @assertion It is a static error when await is used when the collection
/// literal is not inside an asynchronous function.
///
/// @description Checks that it is a static error when await is used when the
/// collection literal is not inside an asynchronous function.
/// @author sgrekhov@unipro.ru
main() {
[await for (String i in Stream.fromIterable(["not", "int"])) i];
// ^
// [analyzer] unspecified
// [cfe] unspecified
}