From e17c055df049c6f8b42d31629e70df5bb44e2bfb Mon Sep 17 00:00:00 2001 From: Denys Shabalin Date: Mon, 24 Feb 2014 15:10:39 +0100 Subject: 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 `..$`. --- .../scalacheck/quasiquotes/TermDeconstructionProps.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/files/scalacheck') 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") + } } -- cgit v1.2.3