| library; |
| // |
| // Problems in library: |
| // |
| // org-dartlang-test:///a/b/c/main.dart:8:2: Error: The macro 'Macro' can't be applied in the same library cycle where it is defined. |
| // Try moving it to a different library that does not import the one where it is applied. |
| // @Macro() // Error |
| // ^ |
| // |
| import self as self; |
| import "main_lib.dart" as mai; |
| |
| import "dart:async"; |
| import "org-dartlang-test:///a/b/c/main_lib.dart"; |
| |
| @#C1 |
| static method method() → dynamic {} |
| |
| library; |
| import self as mai; |
| import "dart:core" as core; |
| import "package:_macros/src/api.dart" as api; |
| |
| import "dart:async"; |
| import "package:macros/macros.dart"; |
| import "org-dartlang-test:///a/b/c/main.dart"; |
| |
| macro class Macro extends core::Object implements api::FunctionDeclarationsMacro /*hasConstConstructor*/ { |
| const constructor •() → mai::Macro |
| : super core::Object::•() |
| ; |
| method buildDeclarationsForFunction(api::FunctionDeclaration function, api::DeclarationBuilder builder) → FutureOr<void> {} |
| } |
| |
| constants { |
| #C1 = mai::Macro {} |
| } |