summaryrefslogtreecommitdiff
path: root/test/files/scalacheck
diff options
context:
space:
mode:
authorDenys Shabalin <denys.shabalin@typesafe.com>2014-02-24 15:10:39 +0100
committerDenys Shabalin <denys.shabalin@typesafe.com>2014-02-28 21:27:21 +0100
commite17c055df049c6f8b42d31629e70df5bb44e2bfb (patch)
treec43de16c7e498f39e66a445276d635f1fd51034e /test/files/scalacheck
parent13e7b8112fb412bb3ed29716409087aed0f2a7e4 (diff)
downloadscala-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/files/scalacheck')
-rw-r--r--test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala11
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")
+ }
}