diff options
Diffstat (limited to 'test/files/neg/unit-returns-value.check')
-rw-r--r-- | test/files/neg/unit-returns-value.check | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/files/neg/unit-returns-value.check b/test/files/neg/unit-returns-value.check index ab458a350b..363946f94d 100644 --- a/test/files/neg/unit-returns-value.check +++ b/test/files/neg/unit-returns-value.check @@ -1,7 +1,9 @@ -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 +error: No warnings can be incurred under -Xfatal-warnings. +two warnings found +one error found |