File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 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).
897897
898898#### Adding macro applications to new declarations  
899899
900- When creating [ Code ] [ ]  instances, a macro may generate code which includes
900+ When creating [ DeclarationCode ] [ ]  instances, a macro may generate code which includes
901901macro applications. These macro applications must be from either the current
902902phase or a later phase, but cannot be from previous phases.
903903
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.
907906
908907If a macro application is added which runs in the same phase as the current
909908one, then it is immediately expanded after execution of the current macro,
910909following the normal ordering rules.
911910
911+ [ DeclarationCode ] : https://github.com/dart-lang/sdk/blob/main/pkg/_fe_analyzer_shared/lib/src/macros/api/code.dart#L37 
912+ 
912913#### Ordering violations  
913914
914915Both of these mechanisms allow for normal macro ordering to be circumvented.
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments