Skip to content

Incorrectly supported auto-tupling for case classes #11061

Closed
@liufengyun

Description

@liufengyun

Minimized code

case class Foo(a: Int, b: Int)

object Test {
  def foo(x: Foo) = List(x).map(_ + _)
  
  def main(args: Array[String]): Unit = println(foo(Foo(3, 4)))
}

Output

The code compiles and runs.

Expectation

The code should be rejected, as in Scala 2.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions