diff options
Diffstat (limited to 'test/files/run/retclosure.scala')
-rw-r--r-- | test/files/run/retclosure.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/files/run/retclosure.scala b/test/files/run/retclosure.scala index b36a6e36ba..d354cb3586 100644 --- a/test/files/run/retclosure.scala +++ b/test/files/run/retclosure.scala @@ -6,14 +6,15 @@ object Test { def response: String = { def check: Option[String] = { val closure: String=>Nothing = - p => return Some("deep return") // should return from check + p => return Some("some problem") // should return from check closure("whatever") } - check - - return "ok" + check match { + case Some(problem) => "check failed: " + problem + case None => "ok" + } } def main(args: Array[String]) { |