diff options
author | Lex Spoon <lex@lexspoon.org> | 2006-11-24 14:00:58 +0000 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2006-11-24 14:00:58 +0000 |
commit | 327b87d1c60745e9f33cb2c5f28fcef14f234f74 (patch) | |
tree | 3061bb0a631c30d8b323260db3b39d00991b922c /test/files/run/retclosure.scala | |
parent | b09e4cd1c63aaddd99678b47c08c97df786cac20 (diff) | |
download | scala-327b87d1c60745e9f33cb2c5f28fcef14f234f74.tar.gz scala-327b87d1c60745e9f33cb2c5f28fcef14f234f74.tar.bz2 scala-327b87d1c60745e9f33cb2c5f28fcef14f234f74.zip |
Fixed the test to be clearer
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]) { |