c10e96ba2f
Change-Id: I9daeebde586a00169bdaf069c7dc2fdc5d3d97f2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147160 Commit-Queue: Lasse R.H. Nielsen <lrn@google.com> Reviewed-by: Bob Nystrom <rnystrom@google.com>
25 lines
640 B
Dart
25 lines
640 B
Dart
// Copyright (c) 2020, 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.
|
|
|
|
// [NNBD non-migrated] This test has no NNBD equivalent.
|
|
// In NNBD, you are not allowed to await `void` and the corresponding test
|
|
// is await_void_error_test.dart
|
|
|
|
// Test that it is not an error to await an expression of type `void`.
|
|
|
|
import "dart:async";
|
|
|
|
void v;
|
|
List<void> vs = [null];
|
|
FutureOr<void> fov;
|
|
|
|
void main() async {
|
|
await print('');
|
|
await v;
|
|
await vs[0];
|
|
var v2 = vs[0];
|
|
await v2;
|
|
await fov;
|
|
}
|