5
Predef.any2stringadd
で問題が発生しました。残念ながらofficially considered not a PITAです。私は型クラスのアプローチVapourise Predef.any2stringadd in interpreter
object Foo {
implicit def fooOps(f: Foo): Ops = new Ops(f)
final class Ops(f: Foo) {
def +(that: Foo): Foo = ???
}
}
trait Foo
に
trait Foo {
def +(that: Foo): Foo
}
から私のAPIを変更し今、私はでその恐ろしい方法は、このようなコードをコンパイル非表示にすることができます:
import Predef.{any2stringadd => _}
しかし、これが失敗私のREPL /通訳環境では
val in = new IMain(settings, out)
in.addImports("Predef.{any2stringadd => _}") // has no effect?
どのように通訳者にこの厄介な方法を知らせることができますか?