aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos')
-rw-r--r--tests/pos/i873.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/pos/i873.scala b/tests/pos/i873.scala
index 71c8a3959..94f8d2c67 100644
--- a/tests/pos/i873.scala
+++ b/tests/pos/i873.scala
@@ -1,4 +1,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
}