diff options
author | Den Shabalin <den.shabalin@gmail.com> | 2013-09-05 20:41:48 +0200 |
---|---|---|
committer | Den Shabalin <den.shabalin@gmail.com> | 2013-09-05 20:42:10 +0200 |
commit | 546e94099d667c6395582fcba321ef95578121a5 (patch) | |
tree | 6c250294e163c0aa008d117b5e994003174857fe /test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala | |
parent | 1352fea1c4ecfa0fd66ff1d5ad6e0ee437b1a59f (diff) | |
download | scala-546e94099d667c6395582fcba321ef95578121a5.tar.gz scala-546e94099d667c6395582fcba321ef95578121a5.tar.bz2 scala-546e94099d667c6395582fcba321ef95578121a5.zip |
SI-7803 support for matching of anonymous function literals
Diffstat (limited to 'test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala')
-rw-r--r-- | test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala | 9 |
1 files changed, 8 insertions, 1 deletions
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") + } +} |