Open dragos opened 11 years ago
Overloads are not supported by the instrumenter:
class C { def foo[A](x: Int, y: String) = println("foo") def foo[A](x: Int) = println("overloaded foo") foo(10) }
gives the following instrumented code:
object scratch {;import scala.runtime.WorksheetSupport._; def main(args: Array[String])=$execute{;$skip(183); def foo[A](x: Int, y: String = "abc") = println("foo");System.out.println("""foo: [A](x: Int, y: String)Unit""");$skip(49); def foo[A](x: Int) = println("overloaded foo");System.out.println("""foo: [A](x: Int)Unit""");$skip(10); foo(10)} }
and the error:
method foo is defined twice
Overloads are not supported by the instrumenter:
gives the following instrumented code:
and the error: