File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -666,6 +666,11 @@ implement in order to apply the macro in a given phase on a given declaration.
666
666
For example, a macro applied to classes in the declaration phase implements
667
667
` ClassDeclarationsMacro ` and its ` buildDeclarationsForClass ` method.
668
668
669
+ The set of macro interfaces implemented determines where the macro can
670
+ usefully be applied, and it is a compile error to apply it anywhere else. For
671
+ example, if a macro does not implement any of the ` Class*Macro ` interfaces, it
672
+ is a compile error to apply it to a class.
673
+
669
674
When a Dart implementation executes macros, it invokes these builder methods at
670
675
the appropriate phase for the declarations the macro is applied to. Each builder
671
676
method is passed two arguments which give the macro the context and capabilities
You can’t perform that action at this time.
0 commit comments