summaryrefslogtreecommitdiff
path: root/test/files/neg/patmat-type-check.check
blob: e045841ce174b6055ae5d600166d9f5262c7ca6a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
patmat-type-check.scala:22: error: scrutinee is incompatible with pattern type;
 found   : Seq[A]
 required: String
  def f1 = "bob".reverse match { case Seq('b', 'o', 'b') => true } // fail
                                         ^
patmat-type-check.scala:23: error: scrutinee is incompatible with pattern type;
 found   : Seq[A]
 required: Array[Char]
  def f2 = "bob".toArray match { case Seq('b', 'o', 'b') => true } // fail
                                         ^
patmat-type-check.scala:27: error: scrutinee is incompatible with pattern type;
 found   : Seq[A]
 required: Test.Bop2
  def f3(x: Bop2) = x match { case Seq('b', 'o', 'b') => true } // fail
                                      ^
patmat-type-check.scala:30: error: scrutinee is incompatible with pattern type;
 found   : Seq[A]
 required: Test.Bop3[Char]
  def f4[T](x: Bop3[Char]) = x match { case Seq('b', 'o', 'b') => true } // fail
                                               ^
four errors found