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 @@ -53,26 +53,12 @@ package object async {
5353
5454 import scala .tools .nsc ._ , reporters ._
5555 def mkGlobal (compileOptions : String = " " ): Global = {
56- val source = """
57- | class Test {
58- | def test = {
59- | import scala.async.Async._, scala.concurrent._, ExecutionContext.Implicits.global
60- | async {
61- | val opt = await(async(Option.empty[String => Future[Unit]]))
62- | opt match {
63- | case None =>
64- | throw new RuntimeException("case a")
65- | case Some(f) =>
66- | await(f("case b"))
67- | }
68- | }
69- | }
70- | }
71- | """ .stripMargin
7256 val settings = new Settings ()
7357 settings.processArgumentString(compileOptions)
74- settings.usejavacp .value = true
58+ val initClassPath = settings.classpath .value
7559 settings.embeddedDefaults(getClass.getClassLoader)
60+ if (initClassPath == settings.classpath.value)
61+ settings.usejavacp.value = true // not running under SBT, try to use the Java claspath instead
7662 val reporter = new StoreReporter
7763 new Global (settings, reporter)
7864 }
You can’t perform that action at this time.
0 commit comments