diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-03-27 13:23:49 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-03-27 16:16:11 +0100 |
commit | a0c3bbdb3a4b1055834f3ff5f729dc3af1867696 (patch) | |
tree | 1f05aeae0ae50adcbe6fa5c48287015edc573c21 /test/files/scalacheck/quasiquotes/DefinitionDeconstructionProps.scala | |
parent | c765537cb3532a7b88f1b68331840953f3e9d048 (diff) | |
download | scala-a0c3bbdb3a4b1055834f3ff5f729dc3af1867696.tar.gz scala-a0c3bbdb3a4b1055834f3ff5f729dc3af1867696.tar.bz2 scala-a0c3bbdb3a4b1055834f3ff5f729dc3af1867696.zip |
SI-8451 quasiquotes now handle quirks of secondary constructors
Apparently even though the rhs of a secondary constructor looks like an expr,
it always gets wrapped in a block by the parser. This works just fine with
the typer, but crashes in uncurry. This commit brings quasiquotes in line with the parser.
Diffstat (limited to 'test/files/scalacheck/quasiquotes/DefinitionDeconstructionProps.scala')
-rw-r--r-- | test/files/scalacheck/quasiquotes/DefinitionDeconstructionProps.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/files/scalacheck/quasiquotes/DefinitionDeconstructionProps.scala b/test/files/scalacheck/quasiquotes/DefinitionDeconstructionProps.scala index af7f2164a0..2c0e100b5a 100644 --- a/test/files/scalacheck/quasiquotes/DefinitionDeconstructionProps.scala +++ b/test/files/scalacheck/quasiquotes/DefinitionDeconstructionProps.scala @@ -229,6 +229,12 @@ trait DefDeconstruction { self: QuasiquoteProperties => val q"def foo(...$argss)(implicit ..$impl)" = q"def foo(x: Int)" assert(impl.isEmpty) } + + property("SI-8451") = test { + val q"def this(..$params) = this(..$args)" = q"def this(x: Int) = this(0)" + assert(params ≈ List(q"${Modifiers(PARAM)} val x: Int")) + assert(args ≈ List(q"0")) + } } trait ImportDeconstruction { self: QuasiquoteProperties => |