File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
compiler/src/scala/quoted/runtime/impl Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -458,16 +458,17 @@ 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 : Array [ TypeDef ], i : Int ): MatchingExprs =
461+ inline def recur (i : Int ): MatchingExprs =
462462 if i == 2 then
463463 matched
464464 else
465- tds(i).rhs match
465+ val td = if i == 0 then sctypedef else pttypedef
466+ td.rhs match
466467 case tbt : TypeBoundsTree
467468 if tbt.lo.tpe.isNothingType && tbt.hi.tpe.isAny && tbt.alias.isEmpty
468- => recur(tds, i + 1 )
469+ => recur(i + 1 )
469470 case _ => notMatched
470- recur(Array (sctypedef, pttypedef), i = 0 )
471+ recur(i = 0 )
471472
472473 def matchParamss (scparamss : List [ParamClause ], ptparamss : List [ParamClause ])(using Env ): optional[(Env , MatchingExprs )] =
473474 (scparamss, ptparamss) match {
You can’t perform that action at this time.
0 commit comments