blob: 9954fdd83462a00185d26863c39afd30b10148e2 [file]
// 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 expression is not one of the
/// following:
/// • A reference to a compile-time constant variable.
/// • A call to a constant constructor.
///
/// @description Check that if static class method is used as metadata, then a
/// compile time error is raised.
/// @author a.semenov@unipro.ru
class A {
static int a() {
return 10;
}
}
@A.a()
//^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
class B {}
main() {
print(B);
}