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
Error caused for generic apply calling #1785
Imported From: https://issues.scala-lang.org/browse/SI-1785?orig=1
I agree in principle, and trunk already has several fixes allowing for apply methods to be called more flexibly, for instance this doesn't work in 2.7.3:
scala> def foo(x: Int, y: Int) = x + y foo: (Int,Int)Int scala> (foo _)(5, 10) res0: Int = 15
However this would represent a rather more significant change to the parser and I'm not really convinced it's a good idea given that it works if you let the type argument be inferred or if you call apply explicitly.
scala> (new A)(1) res0: Int = 1 scala> (new A).apply[Int](1) res1: Int = 1
So I recategorized to enhancement.