summaryrefslogtreecommitdiff
path: root/test/files/neg/unit-returns-value.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-04-24 19:16:10 +0000
committerPaul Phillips <paulp@improving.org>2011-04-24 19:16:10 +0000
commit60463a8721728545d7d626d96f77e8688084c71f (patch)
tree6cc639b7b4539cfdae45a0ab468c2d6202d1651a /test/files/neg/unit-returns-value.check
parent870679585afc3fe8dc07b40fe032919ede414489 (diff)
downloadscala-60463a8721728545d7d626d96f77e8688084c71f.tar.gz
scala-60463a8721728545d7d626d96f77e8688084c71f.tar.bz2
scala-60463a8721728545d7d626d96f77e8688084c71f.zip
Added warning when someone tries to return a no...
Added warning when someone tries to return a non-Unit value from a Unit method, no review.
Diffstat (limited to 'test/files/neg/unit-returns-value.check')
-rw-r--r--test/files/neg/unit-returns-value.check4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/files/neg/unit-returns-value.check b/test/files/neg/unit-returns-value.check
new file mode 100644
index 0000000000..18368f45ab
--- /dev/null
+++ b/test/files/neg/unit-returns-value.check
@@ -0,0 +1,4 @@
+unit-returns-value.scala:4: error: enclosing method f has result type Unit: return value discarded
+ if (b) return 5
+ ^
+one error found