From 546e94099d667c6395582fcba321ef95578121a5 Mon Sep 17 00:00:00 2001 From: Den Shabalin Date: Thu, 5 Sep 2013 20:41:48 +0200 Subject: SI-7803 support for matching of anonymous function literals --- test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala') diff --git a/test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala b/test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala index 6087bbdb74..762625a46a 100644 --- a/test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala +++ b/test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala @@ -67,4 +67,11 @@ object TermDeconstructionProps extends QuasiquoteProperties("term deconstruction val q"{ ..$xs }" = q"{ x1; x2; x3 }" assert(xs ≈ List(q"x1", q"x2", q"x3")) } -} \ No newline at end of file + + property("exhaustive function matcher") = test { + def matches(line: String) { val q"(..$args) => $body" = parse(line) } + matches("() => bippy") + matches("(y: Y) => y oh y") + matches("(x: X, y: Y) => x and y") + } +} -- cgit v1.2.3