scala-ide / scala-worksheet

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

type alias generation error #88

Closed alebianco closed 11 years ago

alebianco commented 11 years ago

this simple code

object week2{
  type Foo = Double
  def bar:Foo = 1.0
}

results in eclipse reporting an error:

identifier expected but '.' found

because the worksheet generates the following code

object week2{
  type Foo = Doubleimport scala.runtime.WorksheetSupport._; def main(args: Array[String])=$execute{;$skip(53); 
  def bar:Foo = 1.0;System.out.println("""bar: => week2.Foo""")}
}.

also, I've found that adding some neutral instruction, line println("hello"), at the beginning of the worksheet, is a quick workaround to the problem

dotta commented 11 years ago

This appears to be fixed with the latest V0.1.2 release.