File tree 1 file changed +3
-17
lines changed
src/test/scala/scala/async
1 file changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -53,26 +53,12 @@ package object async {
53
53
54
54
import scala .tools .nsc ._ , reporters ._
55
55
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
72
56
val settings = new Settings ()
73
57
settings.processArgumentString(compileOptions)
74
- settings.usejavacp .value = true
58
+ val initClassPath = settings.classpath .value
75
59
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
76
62
val reporter = new StoreReporter
77
63
new Global (settings, reporter)
78
64
}
You can’t perform that action at this time.
0 commit comments