blob: 5eca3d6fc95547f177d86c61c1217002dbf1cba2 [file] [log] [blame]
/*
* Copyright (c) 2015, 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.
*/
/**
* @assertion It is a compile-time error if the function immediately enclosing
* a is not declared asynchronous. However, this error is simply a syntax
* error, because in the context of a normal function, await has no special
* meaning.
*
* @description Check that in the context of a non-async static method, await
* has no special meaning and can be used as a variable
* @author sgrekhov@unipro.ru
*/
import '../../../Utils/expect.dart';
class C {
static test() {
int await = 1;
await++;
Expect.equals(2, await);
}
}
main() {
C.test();
}