scala-ide / scala-worksheet

A Scala IDE plugin for a multi-line REPL (called worksheet)
96 stars 24 forks source link

Worksheet fails silently when a method is overloaded #211

Open matthewfarwell opened 9 years ago

matthewfarwell commented 9 years ago

If I create a worksheet with the following contents, the worksheet fails silently, no warnings, no errors :

object worksheet {
  def bar(a: Int) = 77

  def bar(b: String): Int = 66

  bar(66)
  bar("String")
}

However, if I rename one of the methods (to bar2), it works:

object worksheet {
  def bar(a: Int) = 77                            //> bar: (a: Int)Int

  def bar2(b: String): Int = 66                   //> bar2: (b: String)Int

  bar(66)                                         //> res0: Int = 77
  bar2("String")                                  //> res1: Int = 66
}

This is using

org.scala-ide.sbt.feature (4.0.0.201412161056) "Sbt Library for Eclipse"
org.scala-ide.scala211.feature (4.0.0.201412161056) "Scala Standard Library"
org.scala-ide.sdt.feature (4.0.0.v-2_11-201412161058-027320c) "Scala Plugin"
org.scala-ide.sdt.scalatest.feature (2.9.3.v-4-2_11-201411200954-82f5fff) "ScalaTest Plugin"
org.scalaide.worksheet.feature (0.2.6.v-2_11-201412171534-8101792) "Scala Worksheet plugin"