| 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 = #C1; |
| 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 = #C1; |
| static method method() → void {} |
| @#C2 |
| @#C3 |
| @#C4 |
| @#C2 |
| @#C3 |
| @#C4 |
| @#C1 |
| @#C1 |
| @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 |
| ^" |
| @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 |
| ^" |
| @#C1 |
| @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 |
| ^" |
| @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 |
| ^" |
| @#C1 |
| @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 |
| ^" |
| @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 |
| ^" |
| static method main() → dynamic {} |
| |
| constants { |
| #C1 = 1 |
| #C2 = self::Class {} |
| #C3 = self::GenericClass<dynamic, dynamic> {} |
| #C4 = self::GenericClass<core::int*, core::String*> {} |
| } |
| |
| |
| Constructor coverage from constants: |
| org-dartlang-testcase:///annotation_new.dart: |
| - Class. (from org-dartlang-testcase:///annotation_new.dart:12:9) |
| - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) |
| - GenericClass. (from org-dartlang-testcase:///annotation_new.dart:20:9) |