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 | |
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')
-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]) { |