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