diff options
Diffstat (limited to 'tests/patmat/partial-function.scala')
-rw-r--r-- | tests/patmat/partial-function.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/patmat/partial-function.scala b/tests/patmat/partial-function.scala new file mode 100644 index 000000000..f168489da --- /dev/null +++ b/tests/patmat/partial-function.scala @@ -0,0 +1,12 @@ +sealed abstract class TA +sealed abstract class TB extends TA +case object B extends TB +case object B2 extends TB + +case class CC(i: Int, tb: TB) + +object Test { + def foo: PartialFunction[CC, Unit] = { + case CC(_, B) => () + } +}
\ No newline at end of file |