blob: 0c363c83ffa31b5f4a69b66c74a486d62c4f28e9 [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 normal method, await has no
/// special meaning and can be used as a variable
/// @author sgrekhov@unipro.ru
import '../../../Utils/expect.dart';
class C {
test() {
int await = 1;
await++;
Expect.equals(2, await);
}
}
main() {
C c = new C();
c.test();
}