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 @@ -68,7 +68,7 @@ class TypeUtils:
68
68
def tupleElementTypesUpTo (bound : Int , normalize : Boolean = true )(using Context ): Option [List [Type ]] =
69
69
def recur (tp : Type , bound : Int ): Option [List [Type ]] =
70
70
if bound < 0 then Some (Nil )
71
- else (if normalize then tp.normalized else tp).dealias match
71
+ else (if normalize then tp.dealias. normalized else tp).dealias match
72
72
case AppliedType (tycon, hd :: tl :: Nil ) if tycon.isRef(defn.PairClass ) =>
73
73
recur(tl, bound - 1 ).map(hd :: _)
74
74
case tp : AppliedType if defn.isTupleNType(tp) && normalize =>
@@ -83,8 +83,7 @@ class TypeUtils:
83
83
case _ =>
84
84
if defn.isTupleClass(tp.typeSymbol) && ! normalize then Some (tp.dealias.argInfos)
85
85
else None
86
- val stripped = if normalize then self.stripTypeVar.dealias else self.stripTypeVar // keep error reporting aliased
87
- recur(stripped, bound)
86
+ recur(self.stripTypeVar, bound)
88
87
89
88
/** Is this a generic tuple but not already an instance of one of Tuple1..22? */
90
89
def isGenericTuple (using Context ): Boolean =
You can’t perform that action at this time.
0 commit comments