File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1360,7 +1360,7 @@ trait Applications extends Compatibility {
1360
1360
for (argType <- argTypes) assert(! isBounds(argType), unapplyApp.tpe.show)
1361
1361
val bunchedArgs = argTypes match {
1362
1362
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
1364
1364
else args
1365
1365
case _ => args
1366
1366
}
Original file line number Diff line number Diff line change
1
+ -- [E007] Type Mismatch Error: tests/neg/i10757.scala:4:23 -------------------------------------------------------------
2
+ 4 | case Var(name, _) => name: String // error
3
+ | ^^^^
4
+ | Found: (name : Any)
5
+ | Required: String
6
+
7
+ 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