@@ -214,6 +214,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
214214
215215 val flags = ddef.flags
216216 if (flags.isImplicit) this += " implicit "
217+ if (flags.isInline) this += " inline "
217218 if (flags.isOverride) this += " override "
218219
219220 this += " def " += name
@@ -231,16 +232,8 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
231232 }
232233 this
233234
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)
244237
245238 case Term .Select (qual, name, sig) =>
246239 printTree(qual)
@@ -907,6 +900,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
907900 case Type .TypeRef (_, Type .SymRef (PackageDef (" internal" , _), Type .ThisType (Type .SymRef (PackageDef (" annotation" , _), NoPrefix ())))) => false
908901 case _ => true
909902 }
903+ case x => throw new MatchError (x.show)
910904 }
911905 printAnnotations(annots)
912906 if (annots.nonEmpty) this += " "
@@ -969,7 +963,9 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
969963
970964 private object Annotation {
971965 def unapply (arg : Tree )(implicit ctx : Context ): Option [(TypeTree , List [Term ])] = arg match {
966+ case Term .New (annot) => Some ((annot, Nil ))
972967 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))
973969 case _ => None
974970 }
975971 }
0 commit comments