- Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
case classfixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)help wanted
Milestone
Description
case class Foo private (num: Int) object Foo { def apply(x: Double): Foo = x.toInt match { case x if x < 0 => throw new Exception(x + " < 0") case x => new Foo(x) } } object Test { def main(args: Array[String]): Unit = { val x = Foo(5d) println(x -> x.copy(num = -1000)) } } // % scala Test // (Foo(5),Foo(-1000))
micseydel and satorg
Metadata
Metadata
Assignees
Labels
case classfixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)help wanted