unit-returns-value.scala:4: error: 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 if (b) return 5 ^ two errors found