File tree 1 file changed +2
-3
lines changed
compiler/src/dotty/tools/dotc/core 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ class TypeUtils:
60
60
def tupleElementTypesUpTo (bound : Int , normalize : Boolean = true )(using Context ): Option [List [Type ]] =
61
61
def recur (tp : Type , bound : Int ): Option [List [Type ]] =
62
62
if bound < 0 then Some (Nil )
63
- else (if normalize then tp.normalized else tp).dealias match
63
+ else (if normalize then tp.dealias. normalized else tp).dealias match
64
64
case AppliedType (tycon, hd :: tl :: Nil ) if tycon.isRef(defn.PairClass ) =>
65
65
recur(tl, bound - 1 ).map(hd :: _)
66
66
case tp : AppliedType if defn.isTupleNType(tp) && normalize =>
@@ -71,8 +71,7 @@ class TypeUtils:
71
71
case _ =>
72
72
if defn.isTupleClass(tp.typeSymbol) && ! normalize then Some (tp.dealias.argInfos)
73
73
else None
74
- val stripped = if normalize then self.stripTypeVar.dealias else self.stripTypeVar // keep error reporting aliased
75
- recur(stripped, bound)
74
+ recur(self.stripTypeVar, bound)
76
75
77
76
/** Is this a generic tuple but not already an instance of one of Tuple1..22? */
78
77
def isGenericTuple (using Context ): Boolean =
You can’t perform that action at this time.
0 commit comments