summaryrefslogtreecommitdiff
path: root/test/files/pos/t9658.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/t9658.scala')
-rw-r--r--test/files/pos/t9658.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/pos/t9658.scala b/test/files/pos/t9658.scala
new file mode 100644
index 0000000000..a2c695a8ae
--- /dev/null
+++ b/test/files/pos/t9658.scala
@@ -0,0 +1,10 @@
+sealed trait G[T]
+case object GI extends G[Int]
+
+class C {
+ def typerFail[T](rt: G[T]): T = rt match {
+ case GI =>
+ { case x => x } : PartialFunction[Any, Any] // comment this line, compiles.
+ 0 // found Int, required T
+ }
+}