summaryrefslogblamecommitdiff
path: root/test/files/neg/unit-returns-value.check
blob: ab458a350b7fa1c0776c1dcb1489469357a83ea6 (plain) (tree)
1
2
3
4
5
6
7


                                                                                                                                  


                                                                                                  
                
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