File tree Expand file tree Collapse file tree 1 file changed +3
-17
lines changed
src/test/scala/scala/async Expand file tree Collapse file tree 1 file changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -44,26 +44,12 @@ package object async {
4444
4545 import scala .tools .nsc ._ , reporters ._
4646 def mkGlobal (compileOptions : String = " " ): Global = {
47- val source = """
48- | class Test {
49- | def test = {
50- | import scala.async.Async._, scala.concurrent._, ExecutionContext.Implicits.global
51- | async {
52- | val opt = await(async(Option.empty[String => Future[Unit]]))
53- | opt match {
54- | case None =>
55- | throw new RuntimeException("case a")
56- | case Some(f) =>
57- | await(f("case b"))
58- | }
59- | }
60- | }
61- | }
62- | """ .stripMargin
6347 val settings = new Settings ()
6448 settings.processArgumentString(compileOptions)
65- settings.usejavacp .value = true
49+ val initClassPath = settings.classpath .value
6650 settings.embeddedDefaults(getClass.getClassLoader)
51+ if (initClassPath == settings.classpath.value)
52+ settings.usejavacp.value = true // not running under SBT, try to use the Java claspath instead
6753 val reporter = new StoreReporter
6854 new Global (settings, reporter)
6955 }
You can’t perform that action at this time.
0 commit comments