File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1360,7 +1360,7 @@ trait Applications extends Compatibility {
13601360 for (argType <- argTypes) assert(! isBounds(argType), unapplyApp.tpe.show)
13611361 val bunchedArgs = argTypes match {
13621362 case argType :: Nil =>
1363- if (args.lengthCompare(1 ) > 0 && Feature .autoTuplingEnabled) untpd.Tuple (args) :: Nil
1363+ if (args.lengthCompare(1 ) > 0 && Feature .autoTuplingEnabled && defn.isTupleType(argType) ) untpd.Tuple (args) :: Nil
13641364 else args
13651365 case _ => args
13661366 }
Original file line number Diff line number Diff line change 1+ -- [E107] Syntax Error: tests/neg/i10757.scala:4:10 --------------------------------------------------------------------
2+ 4 | case Var(name, _) => name: String // error
3+ | ^^^^^^^^^^^^
4+ | Wrong number of argument patterns for Var; expected: (String)
5+
6+ longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change 1+ case class Var (name : String )
2+
3+ @ main def f = Var (" a" ) match
4+ case Var (name, _) => name : String // error
You can’t perform that action at this time.
0 commit comments