summaryrefslogtreecommitdiff
path: root/test/files/neg/patmat-type-check.check
blob: ab4451f089302a22bcf5eb7a3d007d4782852e3d (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
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:22: error: value _1 is not a member of object Seq
  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:23: error: value _1 is not a member of object Seq
  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:27: error: value _1 is not a member of object Seq
  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
                                               ^
patmat-type-check.scala:30: error: value _1 is not a member of object Seq
  def f4[T](x: Bop3[Char]) = x match { case Seq('b', 'o', 'b') => true } // fail
                             ^
8 errors found