Skip to content
Closed
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/typer/Applications.scala
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ object Applications {
case argType :: Nil
if args.lengthCompare(1) > 0
&& Feature.autoTuplingEnabled
&& defn.isTupleNType(argType) =>
&& (defn.isTupleNType(argType) || argType.isSmallGenericTuple) =>
untpd.Tuple(args) :: Nil
case _ =>
args
Expand Down
8 changes: 8 additions & 0 deletions tests/pos/generic-untupling.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

def foo(x: Option[(Int, Boolean)]) = x match
case Some(a, b) => ??? // was ok
case None => ???

def bar(x: Option[Int *: Boolean *: EmptyTuple]) = x match
case Some(a, b) => ??? // was error, now ok
case None => ???
Loading