@@ -214,6 +214,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
214
214
215
215
val flags = ddef.flags
216
216
if (flags.isImplicit) this += " implicit "
217
+ if (flags.isInline) this += " inline "
217
218
if (flags.isOverride) this += " override "
218
219
219
220
this += " def " += name
@@ -231,16 +232,8 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
231
232
}
232
233
this
233
234
234
- case tree @ Term .Ident (name) =>
235
- tree.tpe match {
236
- case Type .SymRef (_, Types .EmptyPrefix ()) | Type .TermRef (_, Types .EmptyPrefix ()) => this += name
237
- case Type .SymRef (_, prefix) =>
238
- printTypeOrBound(prefix)
239
- this += " ." += name
240
- case Type .TermRef (_, prefix) =>
241
- printTypeOrBound(prefix)
242
- this += " ." += name
243
- }
235
+ case tree @ Term .Ident (_) =>
236
+ printType(tree.tpe)
244
237
245
238
case Term .Select (qual, name, sig) =>
246
239
printTree(qual)
@@ -907,6 +900,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
907
900
case Type .TypeRef (_, Type .SymRef (PackageDef (" internal" , _), Type .ThisType (Type .SymRef (PackageDef (" annotation" , _), NoPrefix ())))) => false
908
901
case _ => true
909
902
}
903
+ case x => throw new MatchError (x.show)
910
904
}
911
905
printAnnotations(annots)
912
906
if (annots.nonEmpty) this += " "
@@ -969,7 +963,9 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
969
963
970
964
private object Annotation {
971
965
def unapply (arg : Tree )(implicit ctx : Context ): Option [(TypeTree , List [Term ])] = arg match {
966
+ case Term .New (annot) => Some ((annot, Nil ))
972
967
case Term .Apply (Term .Select (Term .New (annot), " <init>" , _), args) => Some ((annot, args))
968
+ case Term .Apply (Term .TypeApply (Term .Select (Term .New (annot), " <init>" , _), targs), args) => Some ((annot, args))
973
969
case _ => None
974
970
}
975
971
}
0 commit comments