File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed 
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -523,7 +523,10 @@ class PostTyper extends MacroTransform with InfoTransformer { thisPhase =>
523523        case  UnApply (fun, implicits, patterns) => 
524524          //  Reverse transform order for the same reason as in `app1` above.
525525          val  patterns1  =  transform(patterns)
526-           cpy.UnApply (tree)(transform(fun), transform(implicits), patterns1)
526+           val  tree1  =  cpy.UnApply (tree)(transform(fun), transform(implicits), patterns1)
527+           //  The pickling of UnApply trees uses the tpe of the tree,
528+           //  so we need to clean retains from it here
529+           tree1.withType(transformAnnotsIn(CleanupRetains ()(tree1.tpe)))
527530        case  tree : TypeApply  => 
528531          if  tree.symbol ==  defn.QuotedTypeModule_of  then 
529532            ctx.compilationUnit.needsStaging =  true 
Original file line number Diff line number Diff line change 1+ import  language .experimental .captureChecking 
2+ 
3+ class  Generator : 
4+   private  def  generateTable (table : Table ) = 
5+     val  (ownRelations, _) =  calculateOwnRelations(table)
6+     ownRelations
7+ 
8+   private  def  calculateOwnRelations (table : Table ) = 
9+     val  ownRelations  =  table.relations.filter(_.association.isDefined)
10+     (ownRelations, Nil )
11+ 
12+ case  class  Table (relations : Seq [TableRelation ])
13+ case  class  TableRelation (association : Option [Association ])
14+ trait  Association 
Original file line number Diff line number Diff line change 1+ class  Generator : 
2+   private  def  generateTable (table : Table ) = 
3+     val  (ownRelations, _) =  calculateOwnRelations(table)
4+     ownRelations
5+ 
6+   private  def  calculateOwnRelations (table : Table ) = 
7+     val  ownRelations  =  table.relations.filter(_.association.isDefined)
8+     (ownRelations, Nil )
9+ 
10+ case  class  Table (relations : Seq [TableRelation ])
11+ case  class  TableRelation (association : Option [Association ])
12+ trait  Association 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments