scala-ide / scala-worksheet

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

(-1).to(10) doesn't work in Scala IDE 4.0 worksheet #210

Open cayhorstmann opened 9 years ago

cayhorstmann commented 9 years ago

Making a worksheet

object Fred {
  (-1).to(10)
}

fails with no visible error message and yields this in .worksheet/src:

object Fred {
(-;import org.scalaide.worksheet.runtime.library.WorksheetSupport._; def main(args: Array[String])=$execute{;$skip(26); val res$0 = 1).to(10);System.out.println("""res0: scala.collection.immutable.Range.Inclusive = """ + $show(res$0))}
}

Also, -1.to(10) doesn't work. Both should.