Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

import inside object on top fails #80

lrytz opened this Issue Sep 17, 2012 · 2 comments


None yet
3 participants

lrytz commented Sep 17, 2012

this fails

object Flumi {
  import scala.math.abs

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 commented Sep 17, 2012

@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 commented Nov 18, 2012

This appears to be fixed in V0.1.2

@dotta dotta closed this Nov 18, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment