Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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/core/TypeUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class TypeUtils:
else
self

def isNamedTupleType(using Context): Boolean = self match
def isNamedTupleType(using Context): Boolean = self.normalized.dealias match
case defn.NamedTuple(_, _) => true
case _ => false

Expand Down
12 changes: 12 additions & 0 deletions tests/pos/i24504.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
object Unpack {
trait Expr[T] {
type Fields = NamedTuple.From[T]
}
final case class Pair(a: Int, b: Int)
def unapply(e: Expr[Pair]): e.Fields = ???

val x: Expr[Pair] = ???
x match {
case Unpack(_, _) => ???
}
}
Loading