| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/external_effect/invalid_annotations.dart:6:14: Error: The 'external-effect' pragma can only be applied to methods. |
| // Try removing the pragma or applying it to a method. |
| // external int a; |
| // ^ |
| // |
| // pkg/front_end/testcases/external_effect/invalid_annotations.dart:9:18: Error: The 'external-effect' pragma can only be applied to methods. |
| // Try removing the pragma or applying it to a method. |
| // external int get b; |
| // ^ |
| // |
| // pkg/front_end/testcases/external_effect/invalid_annotations.dart:12:14: Error: The 'external-effect' pragma can only be applied to methods. |
| // Try removing the pragma or applying it to a method. |
| // external set c(int value); |
| // ^ |
| // |
| // pkg/front_end/testcases/external_effect/invalid_annotations.dart:15:6: Error: A function annotated with the 'external-effect' pragma must be external. |
| // Try making the function external. |
| // void d(Object? o) {} |
| // ^ |
| // |
| // pkg/front_end/testcases/external_effect/invalid_annotations.dart:18:15: Error: A function annotated with the 'external-effect' pragma must have the type 'void Function(Object?)' |
| // Try correcting the type of the function. |
| // external void e(Object o); |
| // ^ |
| // |
| // pkg/front_end/testcases/external_effect/invalid_annotations.dart:27:17: Error: A function annotated with the 'external-effect' pragma must be static. |
| // Try making the function static. |
| // external void a(Object? o); |
| // ^ |
| // |
| // pkg/front_end/testcases/external_effect/invalid_annotations.dart:30:23: Error: A function annotated with the 'external-effect' pragma must have the type 'void Function(Object?)' |
| // Try correcting the type of the function. |
| // external static int b(Object? o); |
| // ^ |
| // |
| // pkg/front_end/testcases/external_effect/invalid_annotations.dart:33:24: Error: A function annotated with the 'external-effect' pragma must have the type 'void Function(Object?)' |
| // Try correcting the type of the function. |
| // external static void c(Object? o, Object? x); |
| // ^ |
| // |
| // pkg/front_end/testcases/external_effect/invalid_annotations.dart:36:24: Error: A function annotated with the 'external-effect' pragma must have the type 'void Function(Object?)' |
| // Try correcting the type of the function. |
| // external static void d(int i); |
| // ^ |
| // |
| // pkg/front_end/testcases/external_effect/invalid_annotations.dart:39:24: Error: A function annotated with the 'external-effect' pragma must have the type 'void Function(Object?)' |
| // Try correcting the type of the function. |
| // external static void e([Object? o = const Object()]); |
| // ^ |
| // |
| // pkg/front_end/testcases/external_effect/invalid_annotations.dart:42:24: Error: A function annotated with the 'external-effect' pragma must have the type 'void Function(Object?)' |
| // Try correcting the type of the function. |
| // external static void f({required Object? o}); |
| // ^ |
| // |
| // pkg/front_end/testcases/external_effect/invalid_annotations.dart:45:24: Error: A function annotated with the 'external-effect' pragma must have the type 'void Function(Object?)' |
| // Try correcting the type of the function. |
| // external static void g({Object? o = 3}); |
| // ^ |
| // |
| // pkg/front_end/testcases/external_effect/invalid_annotations.dart:48:24: Error: A function annotated with the 'external-effect' pragma must have the type 'void Function(Object?)' |
| // Try correcting the type of the function. |
| // external static void h<T>(T? t); |
| // ^ |
| // |
| // pkg/front_end/testcases/external_effect/invalid_annotations.dart:23:15: Error: The 'external-effect' pragma must be applied as a String literal. |
| // Try inlining the 'external-string' argument to the pragma. |
| // external void f(Object? o); |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| class A extends core::Object { |
| synthetic constructor •() → self::A |
| : super core::Object::•() |
| ; |
| @#C3 |
| external method a(core::Object? o) → void; |
| @#C3 |
| external static method b(core::Object? o) → core::int; |
| @#C3 |
| external static method c(core::Object? o, core::Object? x) → void; |
| @#C3 |
| external static method d(core::int i) → void; |
| @#C3 |
| external static method e([core::Object? o = #C4]) → void; |
| @#C3 |
| external static method f({required core::Object? o}) → void; |
| @#C3 |
| external static method g({core::Object? o = #C5}) → void; |
| @#C3 |
| external static method h<T extends core::Object? = dynamic>(self::A::h::T? t) → void; |
| } |
| static const field core::String z = #C1; |
| @#C3 |
| external static get a() → core::int; |
| @#C3 |
| external static set a(synthesized core::int #externalFieldValue) → void; |
| @#C3 |
| external static get b() → core::int; |
| @#C3 |
| external static set c(core::int value) → void; |
| @#C3 |
| static method d(core::Object? o) → void {} |
| @#C3 |
| external static method e(core::Object o) → void; |
| @#C3 |
| external static external-effect method f(core::Object? o) → void; |
| static method main() → void {} |
| |
| constants { |
| #C1 = "external-effect" |
| #C2 = null |
| #C3 = core::pragma {name:#C1, options:#C2} |
| #C4 = core::Object {} |
| #C5 = 3 |
| } |
| |
| |
| Constructor coverage from constants: |
| org-dartlang-testcase:///invalid_annotations.dart: |
| - pragma._ (from org-dartlang-sdk:///sdk/lib/core/annotations.dart) |
| - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) |