Aladdin - Scala Bugtracking
[#314] project: compiler priority: high category: bug
submitter assigned to status date submitted
Stephane Martin fixed 2004-03-23 16:36:45.0
subject method overloading does not work on Java 1.5
code
object Test with Application {
  val buf = new StringBuffer(1);
  buf.append('a');
  Console.println(buf.toString())
}
what happened
/home/michelou/tmp> env SCALA_JAVA_EXEC=/home/linuxsoft/apps/java-1.5/bin/java scalac -d ~/tmp/classes/ Tes\
t.scala
Test.scala:4: ambiguous reference to overloaded definition,
both method append: (scala.Char)java.lang.Appendable
and  method append: (scala.Char)java.lang.StringBuffer
match argument types (scala.Char)
  buf.append('a');
            ^
one error foundy
what expected string "a" is printed out (as on Java 1.4.x)
[back to overview]
Changes of this bug report
Stephane  edited on  2004-03-23 16:37:07.0
Stephane  edited on  2004-03-23 16:37:29.0
Stephane  edited on  2004-04-08 13:20:36.0