scala-ide / scala-worksheet

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

implicitis in companion not found for classes defined in worksheet #104

Open lrytz opened 12 years ago

lrytz commented 12 years ago

for classes defined in the worksheet file (inside the worksheet object, or also outside), the compiler does not find implicits in the companion object.

package p

object sheet {
  def fooC(implicit c: C) = 0                     //> fooC: (implicit c: p.C)Int
  fooC        // OK, C is defined in project      //> res0: Int = 0

  def fooD(implicit d: D) = 1                     //> fooD: (implicit d: p.D)Int
//  fooD      // does not work

  class E
  object E {
    implicit val e = new E
  }

  def fooE(implicit e: E) = 2                     //> fooE: (implicit e: p.sheet.E)Int
//  fooE      // does not work
}

class D
object D {
  implicit val d = new D
}
dotta commented 12 years ago

Probably something is wrong with the classpath for compiling the worksheet source. Need to check.