/
patmatnew.check
37 lines (37 loc) · 1.93 KB
/
patmatnew.check
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
patmatnew.scala:673: warning: This catches all Throwables. If this is really intended, use `case e : Throwable` to clear this warning.
case e => {
^
patmatnew.scala:354: warning: a pure expression does nothing in statement position
case 1 => "OK"
^
patmatnew.scala:355: warning: multiline expressions might require enclosing parentheses; a value can be silently discarded when Unit is expected
case 2 => assert(false); "KO"
^
patmatnew.scala:355: warning: a pure expression does nothing in statement position
case 2 => assert(false); "KO"
^
patmatnew.scala:356: warning: multiline expressions might require enclosing parentheses; a value can be silently discarded when Unit is expected
case 3 => assert(false); "KO"
^
patmatnew.scala:356: warning: a pure expression does nothing in statement position
case 3 => assert(false); "KO"
^
patmatnew.scala:175: warning: match may not be exhaustive.
It would fail on the following inputs: List(_), Nil
def doMatch(xs: List[String]): String = xs match {
^
patmatnew.scala:178: warning: match may not be exhaustive.
It would fail on the following inputs: List(_), Nil
def doMatch2(xs: List[String]): List[String] = xs match {
^
patmatnew.scala:280: warning: match may not be exhaustive.
It would fail on the following inputs: List(_), Nil
def doMatch1(xs: List[Char]) = xs match {
^
patmatnew.scala:283: warning: match may not be exhaustive.
It would fail on the following inputs: List(_), Nil
def doMatch2(xs: List[Char]) = xs match {
^
patmatnew.scala:492: warning: unreachable code
case _ if false =>
^