Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
While trying to bridge the gap between tuples and parameter lists, the compiler is a bit too eager to insert 0-Tuples () into argument lists.
This is pretty much never what a developer wants (and we couldn't come up with a single example where the () insertion is “a good thing” in three months), but has been the cause of a lot of embarrassing behavior:
scala> List(1,2,3).toSet() res0: Boolean = false
import java.text.SimpleDateFormat val sdf = new SimpleDateFormat("yyyyMMdd-HH0000") sdf.format() java.lang.IllegalArgumentException: Cannot format given Object as a Date at java.text.DateFormat.format(DateFormat.java:301) at java.text.Format.format(Format.java:157) ...
scala> class A[T](val x: T) defined class A scala> new A res0: A[Unit] = A@5534578f
Mailing list threads:
Imported From: https://issues.scala-lang.org/browse/SI-8035?orig=1