diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/retclosure.check | 2 | ||||
-rw-r--r-- | test/files/run/retclosure.scala | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/test/files/run/retclosure.check b/test/files/run/retclosure.check index ee8cd8e917..94c4971e4a 100644 --- a/test/files/run/retclosure.check +++ b/test/files/run/retclosure.check @@ -1 +1 @@ -deep return +check failed: some problem 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]) { |