File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -131,8 +131,11 @@ object Applications {
131131 else productSelectorTypes(tp, NoSourcePosition )
132132
133133 def productSelectorTypes (tp : Type , errorPos : SrcPos )(using Context ): List [Type ] = {
134- val sels = for (n <- Iterator .from(0 )) yield extractorMemberType(tp, nme.selectorName(n), errorPos)
135- sels.takeWhile(_.exists).toList
134+ if tp.isError then
135+ Nil
136+ else
137+ val sels = for (n <- Iterator .from(0 )) yield extractorMemberType(tp, nme.selectorName(n), errorPos)
138+ sels.takeWhile(_.exists).toList
136139 }
137140
138141 def tupleComponentTypes (tp : Type )(using Context ): List [Type ] =
@@ -218,7 +221,7 @@ object Applications {
218221 val isProduct = args match
219222 case x :: xs => x.isInstanceOf [untpd.NamedArg ] || xs.nonEmpty
220223 case _ => false
221- if isProduct && ! tp.derivesFrom(defn.SeqClass ) && ! tp.isError then
224+ if isProduct && ! tp.derivesFrom(defn.SeqClass ) then
222225 productUnapplySelectors(tp).getOrElse:
223226 // There are unapplys with return types which have `get` and `_1, ..., _n`
224227 // as members, but which are not subtypes of Product. So `productUnapplySelectors`
You can’t perform that action at this time.
0 commit comments