diff options
author | Denys Shabalin <denys.shabalin@typesafe.com> | 2014-02-24 15:10:39 +0100 |
---|---|---|
committer | Denys Shabalin <denys.shabalin@typesafe.com> | 2014-02-28 21:27:21 +0100 |
commit | e17c055df049c6f8b42d31629e70df5bb44e2bfb (patch) | |
tree | c43de16c7e498f39e66a445276d635f1fd51034e /test | |
parent | 13e7b8112fb412bb3ed29716409087aed0f2a7e4 (diff) | |
download | scala-e17c055df049c6f8b42d31629e70df5bb44e2bfb.tar.gz scala-e17c055df049c6f8b42d31629e70df5bb44e2bfb.tar.bz2 scala-e17c055df049c6f8b42d31629e70df5bb44e2bfb.zip |
SI-8275 allow to directly extract block contents of the case def
Due to the fact that blocks in cases are implicit one might expect to be
able to extract its contents with `..$`.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala b/test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala index 7c9b5ead20..c77946c291 100644 --- a/test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala +++ b/test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala @@ -175,4 +175,15 @@ object TermDeconstructionProps extends QuasiquoteProperties("term deconstruction assert(x ≈ q"x") val q"{ _ * _ }" = q"{ _ * _ }" } + + property("si-8275 a") = test { + val cq"_ => ..$stats" = cq"_ => foo; bar" + assert(stats ≈ List(q"foo", q"bar")) + } + + property("si-8275 b") = test { + val cq"_ => ..$init; $last" = cq"_ => a; b; c" + assert(init ≈ List(q"a", q"b")) + assert(last ≈ q"c") + } } |