diff options
Diffstat (limited to 'test/files/scalacheck')
-rw-r--r-- | test/files/scalacheck/quasiquotes/TermConstructionProps.scala | 5 | ||||
-rw-r--r-- | test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/files/scalacheck/quasiquotes/TermConstructionProps.scala b/test/files/scalacheck/quasiquotes/TermConstructionProps.scala index 7447037399..45392de582 100644 --- a/test/files/scalacheck/quasiquotes/TermConstructionProps.scala +++ b/test/files/scalacheck/quasiquotes/TermConstructionProps.scala @@ -305,4 +305,9 @@ object TermConstructionProps extends QuasiquoteProperties("term construction") { q"$scrutinee match { case ..$cases }" } } + + property("construct partial function") = test { + val cases = List(cq"a => b", cq"c => d") + assertEqAst(q"{ case ..$cases }", "{ case a => b case c => d }") + } } diff --git a/test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala b/test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala index 993ceea8e9..9e60729c09 100644 --- a/test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala +++ b/test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala @@ -217,4 +217,9 @@ object TermDeconstructionProps extends QuasiquoteProperties("term deconstruction val q"$_ match { case ..$_ }" = q"{ case _ => }" } } + + property("deconstruct partial function") = test { + val q"{ case ..$cases }" = q"{ case a => b case c => d }" + val List(cq"a => b", cq"c => d") = cases + } } |