Aladdin - Scala Bugtracking
[#446] project: compiler priority: low category: bug
submitter assigned to status date submitted
Gilles Martin fixed 2005-06-13 17:27:18.0
subject Type parameter in call to overloaded method not working
code
object Test {
  def x[T1] (a:List[T1]): Unit = x[T1](a,false);
  def x[T2] (a:List[T2],b:Boolean): Unit = ();
}
what happened
src/fun/Test.scala:4: ambiguous reference to overloaded definition,
both method x: [T1](scala.List[T1])scala.Unit
and  method x: [T2](scala.List[T2],scala.Boolean)scala.Unit
match polymorphic function with 1 parameters
        def x[T1] (a:List[T1]): Unit = x[T1](a,false);
But works when type parameter is ommited from call to x in body of first x.
what expected A sucessfull compilation.
[back to overview]
Changes of this bug report
Gilles  edited on  2006-03-24 17:55:07.0
Fixed in Scala2