aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i1637.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/i1637.scala')
-rw-r--r--tests/pos/i1637.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/pos/i1637.scala b/tests/pos/i1637.scala
new file mode 100644
index 000000000..fa7defb74
--- /dev/null
+++ b/tests/pos/i1637.scala
@@ -0,0 +1,8 @@
+object Main extends App {
+ case class Foo(field: Option[String])
+ val x: PartialFunction[Foo, Int] = { c =>
+ c.field match {
+ case Some(s) => 42
+ }
+ }
+}