summaryrefslogtreecommitdiff
path: root/test/files/neg/t9675.scala
blob: f76b74b6ac5b3ff9a1a0b87107acdf1eb0f90e8e (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
object Test {
  case class A(x: String)

  val func1 = (x: A) => { x != "x" }

  val func2  = (x: A) => { x != "x" }: Boolean

  val func3: Function1[A, Boolean] = (x) => { x != "x" }

  val func4 = new Function1[A, Boolean] {
    def apply(x: A): Boolean = { x != "x" }
  }

  def method(x: A): Boolean = { x != "x" }
  case class PersonInfo(rankPayEtc: Unit)

  def main(args: Array[String]) {
    A("x") != "x"

    val func5: Function1[A, Boolean] = (x) => { x != "x" }

    List(A("x")).foreach((item: A) => item != "x")
  }
}