aboutsummaryrefslogtreecommitdiff
path: root/test/test/TypeStealer.scala
blob: ae48d9a5b9af632e2cc688f60453436d4afecc45 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package test
import scala.tools.nsc.interpreter._
import scala.tools.nsc.Settings

/**
 * Dotty requires a mangled bootclasspath to start. It means that `console` mode of sbt doesn't work for us.
 * At least I(Dmitry) wasn't able to make sbt fork in console
 */
object TypeStealer {
  def main(args: Array[String]): Unit = {
    def repl = new ILoop {}

    val settings = new Settings
    settings.Yreplsync.value = true


    //use when launching normally outside SBT
    settings.usejavacp.value = true

    //an alternative to 'usejavacp' setting, when launching from within SBT
    //settings.embeddedDefaults[Repl.type]

    repl.process(settings)
  }
}