Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

import inside object on top fails #80

Closed
lrytz opened this Issue · 2 comments

3 participants

@lrytz

this fails

object Flumi {
  import scala.math.abs
  abs(1)
}

it generates this

object Flumi {
  import scala.math.absimport scala.runtime.WorksheetSupport._; def main(args: Array[String])=$execute{;$skip(47); val res$0 = 
  abs(1);System.out.println("""res0: Int = """ + $show(res$0))}
}

if you add a statement before the import, we're good

object Flumi {
  val x = 0                                       //> x  : Int = 0
  import scala.math.abs
  abs(1)                                          //> res0: Int = 1
}
@dragos
Owner

@odersky, can you please have a look? This is an issue in the instrumenter, so it needs to be fixed on the compiler side. Better do it before RC1!

@dotta
Owner

This appears to be fixed in V0.1.2

@dotta dotta closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.