blob: 751991c471918f105c07e0d54c2db2bd152ee91a [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/annotation_new.dart:31:2: Error: This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor.
// @method // Error
// ^
//
// pkg/front_end/testcases/general/annotation_new.dart:32:7: Error: This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor.
// @self.method // Error
// ^
//
// pkg/front_end/testcases/general/annotation_new.dart:34:8: Error: This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor.
// @Class.method // Error
// ^
//
// pkg/front_end/testcases/general/annotation_new.dart:35:2: Error: This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor.
// @Class.new // Error
// ^
//
// pkg/front_end/testcases/general/annotation_new.dart:37:13: Error: This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor.
// @self.Class.method // Error
// ^
//
// pkg/front_end/testcases/general/annotation_new.dart:38:7: Error: This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor.
// @self.Class.new // Error
// ^
//
import self as self;
import "dart:core" as core;
import "org-dartlang-testcase:///annotation_new.dart" as self;
class Class extends core::Object /*hasConstConstructor*/ {
static const field core::int field = 1;
const constructor •() self::Class
: super core::Object::•()
;
static method method() void
;
}
class GenericClass<X extends core::Object? = dynamic, Y extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/ {
const constructor •() self::GenericClass<self::GenericClass::X%, self::GenericClass::Y%>
: super core::Object::•()
;
}
static const field core::int field = 1;
static method method() void
;
@self::Class::•()
@self::GenericClass::•<dynamic, dynamic>()
@self::GenericClass::•<core::int, core::String>()
@self::Class::•()
@self::GenericClass::•<dynamic, dynamic>()
@self::GenericClass::•<core::int, core::String>()
@self::field
@self::field
@invalid-expression "pkg/front_end/testcases/general/annotation_new.dart:31:2: Error: This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor.
@method // Error
^" in self::method
@invalid-expression "pkg/front_end/testcases/general/annotation_new.dart:32:7: Error: This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor.
@self.method // Error
^" in self::method
@self::Class::field
@invalid-expression "pkg/front_end/testcases/general/annotation_new.dart:34:8: Error: This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor.
@Class.method // Error
^" in self::Class::method
@invalid-expression "pkg/front_end/testcases/general/annotation_new.dart:35:2: Error: This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor.
@Class.new // Error
^" in self::Class::•
@self::Class::field
@invalid-expression "pkg/front_end/testcases/general/annotation_new.dart:37:13: Error: This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor.
@self.Class.method // Error
^" in self::Class::method
@invalid-expression "pkg/front_end/testcases/general/annotation_new.dart:38:7: Error: This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor.
@self.Class.new // Error
^" in self::Class::•
static method main() dynamic
;
Extra constant evaluation status:
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_new.dart:23:2 -> InstanceConstant(const Class{})
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_new.dart:24:2 -> InstanceConstant(const GenericClass<dynamic, dynamic>{})
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_new.dart:25:2 -> InstanceConstant(const GenericClass<int*, String*>{})
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_new.dart:26:2 -> InstanceConstant(const Class{})
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_new.dart:27:2 -> InstanceConstant(const GenericClass<dynamic, dynamic>{})
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_new.dart:28:2 -> InstanceConstant(const GenericClass<int*, String*>{})
Evaluated: StaticGet @ org-dartlang-testcase:///annotation_new.dart:29:2 -> IntConstant(1)
Evaluated: StaticGet @ org-dartlang-testcase:///annotation_new.dart:30:7 -> IntConstant(1)
Evaluated: StaticGet @ org-dartlang-testcase:///annotation_new.dart:33:8 -> IntConstant(1)
Evaluated: StaticGet @ org-dartlang-testcase:///annotation_new.dart:36:13 -> IntConstant(1)
Extra constant evaluation: evaluated: 10, effectively constant: 10