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

                   
                                                                                                    

                   


                                                          
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: warning: enclosing method f has result type Unit: return value discarded
    if (b) return 5
           ^
error: No warnings can be incurred under -Xfatal-warnings.
two warnings found
one error found