File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -897,18 +897,19 @@ implement their own declarations (#1908).
897
897
898
898
#### Adding macro applications to new declarations
899
899
900
- When creating [ Code ] [ ] instances, a macro may generate code which includes
900
+ When creating [ DeclarationCode ] [ ] instances, a macro may generate code which includes
901
901
macro applications. These macro applications must be from either the current
902
902
phase or a later phase, but cannot be from previous phases.
903
903
904
- If a macro application is added which implements an earlier phase, that phase
905
- is not ran. This should result in a warning if the macro does not also
906
- implement some phase that will be ran.
904
+ It is an error for a macro application to be added which would have applied to
905
+ its declaration in an earlier phase.
907
906
908
907
If a macro application is added which runs in the same phase as the current
909
908
one, then it is immediately expanded after execution of the current macro,
910
909
following the normal ordering rules.
911
910
911
+ [ DeclarationCode ] : https://github.com/dart-lang/sdk/blob/main/pkg/_fe_analyzer_shared/lib/src/macros/api/code.dart#L37
912
+
912
913
#### Ordering violations
913
914
914
915
Both of these mechanisms allow for normal macro ordering to be circumvented.
You can’t perform that action at this time.
0 commit comments