File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
compiler/src/scala/quoted/runtime/impl Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -458,16 +458,16 @@ class QuoteMatcher(debug: Boolean) {
458458 * only when they have empty bounds (>: Nothing <: Any)
459459 */
460460 def matchTypeDef (sctypedef : TypeDef , pttypedef : TypeDef ): MatchingExprs =
461- inline def recur (tds : List [TypeDef ], unwind : Int ): MatchingExprs =
462- if unwind == 0 then
461+ inline def recur (tds : Array [TypeDef ], i : Int ): MatchingExprs =
462+ if i == 2 then
463463 matched
464464 else
465- tds.head match
466- case TypeDef (_, TypeBoundsTree (lo, hi, EmptyTree ))
467- if lo.tpe.isNothingType && hi.tpe.isAny
468- => recur(tds.tail, unwind - 1 )
465+ tds(i).rhs match
466+ case tbt : TypeBoundsTree
467+ if tbt. lo.tpe.isNothingType && tbt. hi.tpe.isAny && tbt.alias.isEmpty
468+ => recur(tds, i + 1 )
469469 case _ => notMatched
470- recur(sctypedef :: pttypedef :: Nil , unwind = 2 )
470+ recur(Array ( sctypedef, pttypedef), i = 0 )
471471
472472 def matchParamss (scparamss : List [ParamClause ], ptparamss : List [ParamClause ])(using Env ): optional[(Env , MatchingExprs )] =
473473 (scparamss, ptparamss) match {
You can’t perform that action at this time.
0 commit comments