aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i873.scala
blob: 94f8d2c67599ce7fa4fe27826161e41525cefc38 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
object Test {
  def call(k: (Int, Int) => Unit): Unit = ???
  def test = call({ case (x, y) => ()})

  trait X extends Function1[Int, String]
  implicit def f2x(f: Function1[Int, String]): X = ???
  ({case _ if "".isEmpty => ""} : X) // allowed, implicit view used to adapt

  // ({case _ if "".isEmpty => 0} : X) // expected String, found Int
}