@@ -201,8 +201,8 @@ trait Printers
201201 this += " Block(" ++= stats += " , " += expr += " )"
202202 case If (cond, thenp, elsep) =>
203203 this += " If(" += cond += " , " += thenp += " , " += elsep += " )"
204- case Lambda (meth, tpt) =>
205- this += " Lambda (" += meth += " , " += tpt += " )"
204+ case Closure (meth, tpt) =>
205+ this += " Closure (" += meth += " , " += tpt += " )"
206206 case Match (selector, cases) =>
207207 this += " Match(" += selector += " , " ++= cases += " )"
208208 case ImpliedMatch (cases) =>
@@ -406,6 +406,7 @@ trait Printers
406406
407407 private implicit class TypeOps (buff : Buffer ) {
408408 def += (x : TypeOrBounds ): Buffer = { visitType(x); buff }
409+ def += (x : Option [TypeOrBounds ]): Buffer = { visitOption(x, visitType); buff }
409410 def ++= (x : List [TypeOrBounds ]): Buffer = { visitList(x, visitType); buff }
410411 }
411412
@@ -911,7 +912,7 @@ trait Printers
911912 case Inlined (_, bindings, expansion) =>
912913 printFlatBlock(bindings, expansion)
913914
914- case Lambda (meth, tpt) =>
915+ case Closure (meth, tpt) =>
915916 // Printed in by it's DefDef
916917 this
917918
@@ -1019,11 +1020,12 @@ trait Printers
10191020 val (stats1, expr1) = flatBlock(stats, expr)
10201021 // Remove Lambda nodes, lambdas are printed by their definition
10211022 val stats2 = stats1.filter {
1022- case Lambda (_, _) => false
1023+ case Closure (_, _) => false
1024+ case IsTypeDef (tree) => ! tree.symbol.annots.exists(_.symbol.owner.fullName == " scala.internal.Quoted$.quoteTypeTag" )
10231025 case _ => true
10241026 }
10251027 val (stats3, expr3) = expr1 match {
1026- case Lambda (_, _) =>
1028+ case Closure (_, _) =>
10271029 val init :+ last = stats2
10281030 (init, last)
10291031 case _ => (stats2, expr1)
0 commit comments