Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/Applications.scala
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ object Applications {
val isProduct = args match
case x :: xs => x.isInstanceOf[untpd.NamedArg] || xs.nonEmpty
case _ => false
if isProduct && !tp.derivesFrom(defn.SeqClass) then
if isProduct && !tp.derivesFrom(defn.SeqClass) && !tp.isError then
productUnapplySelectors(tp).getOrElse:
// There are unapplys with return types which have `get` and `_1, ..., _n`
// as members, but which are not subtypes of Product. So `productUnapplySelectors`
Expand Down
6 changes: 6 additions & 0 deletions tests/neg/i23156.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
object Unpack {
(1, 2) match {
case Unpack(first, _) => first
}
def unapply(e: (Int, Int)): Option[T] = ??? // error
}
Loading