summaryrefslogtreecommitdiff
path: root/test/files/neg/patmatexhaust.check
blob: bbf5e9b5286cd64ea81232faaa68cb2753b855a2 (plain) (blame)
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
38
39
40
41
42
patmatexhaust.scala:7: warning: match may not be exhaustive.
It would fail on the following input: Baz
    def ma1(x:Foo) = x match {
                     ^
patmatexhaust.scala:11: warning: match may not be exhaustive.
It would fail on the following input: Bar(_)
    def ma2(x:Foo) = x match {
                     ^
patmatexhaust.scala:23: warning: match may not be exhaustive.
It would fail on the following inputs: (Kult(_), Kult(_)), (Qult(), Qult())
    def ma3(x:Mult) = (x,x) match { // not exhaustive
                      ^
patmatexhaust.scala:49: warning: match may not be exhaustive.
It would fail on the following inputs: Gp(), Gu
    def ma4(x:Deep) = x match { // missing cases: Gu, Gp which is not abstract so must be included
                      ^
patmatexhaust.scala:55: warning: unreachable code
      case _ if 1 == 0 =>
                       ^
patmatexhaust.scala:53: warning: match may not be exhaustive.
It would fail on the following input: Gp()
    def ma5(x:Deep) = x match {
                      ^
patmatexhaust.scala:75: warning: match may not be exhaustive.
It would fail on the following input: B()
  def ma9(x: B) = x match {
                  ^
patmatexhaust.scala:100: warning: match may not be exhaustive.
It would fail on the following input: C1()
    def ma10(x: C) = x match { // not exhaustive: C1 is not sealed.
                     ^
patmatexhaust.scala:114: warning: match may not be exhaustive.
It would fail on the following inputs: D1, D2()
    def ma10(x: C) = x match {  // not exhaustive: C1 has subclasses.
                     ^
patmatexhaust.scala:126: warning: match may not be exhaustive.
It would fail on the following input: C1()
    def ma10(x: C) = x match { // not exhaustive: C1 is not abstract.
                     ^
error: No warnings can be incurred under -Xfatal-warnings.
10 warnings found
one error found