summaryrefslogtreecommitdiff
path: root/test/files/presentation/recursive-ask/RecursiveAsk.scala
blob: c59d6968a4d59dec8e0d0b81df16af245fb56f9d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import scala.tools.nsc.interactive.tests._

object Test extends InteractiveTest {

  override def main(args: Array[String]): Unit = {
    val res0 = compiler.askForResponse( () => {
      println("[ outer] askForResponse")
      val res = compiler.askForResponse( () => { println("[nested] askForResponse") })
      println (res.get(5000) match {
        case Some(_) => "passed"
        case None    => "timeout"
      })
    })

    res0.get(5000)

    println("done")
    compiler.askShutdown()
  }
}