summaryrefslogtreecommitdiff
path: root/test/files/neg/unit-returns-value.check
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/unit-returns-value.check')
-rw-r--r--test/files/neg/unit-returns-value.check14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/files/neg/unit-returns-value.check b/test/files/neg/unit-returns-value.check
index ab458a350b..f30a506ebe 100644
--- a/test/files/neg/unit-returns-value.check
+++ b/test/files/neg/unit-returns-value.check
@@ -1,7 +1,15 @@
-unit-returns-value.scala:4: error: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+unit-returns-value.scala:4: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
if (b) return 5
^
-unit-returns-value.scala:4: error: enclosing method f has result type Unit: return value discarded
+unit-returns-value.scala:4: warning: enclosing method f has result type Unit: return value discarded
if (b) return 5
^
-two errors found
+unit-returns-value.scala:22: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ i1 // warn
+ ^
+unit-returns-value.scala:23: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ i2 // warn
+ ^
+error: No warnings can be incurred under -Xfatal-warnings.
+four warnings found
+one error found