@@ -228,18 +228,14 @@ class TypeOps:
228228 val stpe = loop(tpe)
229229 s.ByNameType (stpe)
230230
231- case TypeRef (pre, sym : Symbol ) =>
231+ case tr @ TypeRef (pre, _ ) =>
232232 val spre = if tpe.hasTrivialPrefix then s.Type .Empty else loop(pre)
233- val ssym = sym.symbolName
234- s.TypeRef (spre, ssym, Seq .empty)
235-
236- case tr @ TypeRef (_, _ : Name ) =>
237233 val ssym = tr.symbol.symbolName
238- s.TypeRef (s. Type . Empty , ssym, Seq .empty)
234+ s.TypeRef (spre , ssym, Seq .empty)
239235
240- case TermRef (pre, sym : Symbol ) =>
236+ case tr @ TermRef (pre, _ ) =>
241237 val spre = if (tpe.hasTrivialPrefix) s.Type .Empty else loop(pre)
242- val ssym = sym .symbolName
238+ val ssym = tr.symbol .symbolName
243239 s.SingleType (spre, ssym)
244240
245241 case ThisType (TypeRef (_, sym : Symbol )) =>
@@ -453,10 +449,10 @@ class TypeOps:
453449 def checkTrivialPrefix (pre : Type , sym : Symbol )(using Context ): Boolean =
454450 pre =:= sym.owner.thisType
455451 tpe match {
456- case TypeRef (pre, sym : Symbol ) =>
457- checkTrivialPrefix(pre, sym )
458- case TermRef (pre, sym : Symbol ) =>
459- checkTrivialPrefix(pre, sym )
452+ case tr @ TypeRef (pre, _ ) =>
453+ checkTrivialPrefix(pre, tr.symbol )
454+ case tr @ TermRef (pre, _ ) =>
455+ checkTrivialPrefix(pre, tr.symbol )
460456 case _ => false
461457 }
462458
0 commit comments