diff options
author | Denys Shabalin <denys.shabalin@typesafe.com> | 2014-02-25 13:03:41 +0100 |
---|---|---|
committer | Denys Shabalin <denys.shabalin@typesafe.com> | 2014-02-28 11:41:49 +0100 |
commit | 6ec0f2f44f74657799b4b215c913a67089110061 (patch) | |
tree | 3f88e1504ddbefd6dd939f98e4d3fe58774be4e2 /test | |
parent | 13e7b8112fb412bb3ed29716409087aed0f2a7e4 (diff) | |
download | scala-6ec0f2f44f74657799b4b215c913a67089110061.tar.gz scala-6ec0f2f44f74657799b4b215c913a67089110061.tar.bz2 scala-6ec0f2f44f74657799b4b215c913a67089110061.zip |
SI-8333 can't use modifiers if class is in a block
Was caused by the ordering of parser cases. Need to check for definition
first due to the fact that modifiers unquote looks like identifier from
parser point of view.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala b/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala index fdb0d83277..c6ad453c45 100644 --- a/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala +++ b/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala @@ -9,7 +9,7 @@ object DefinitionConstructionProps with ValDefConstruction with PatDefConstruction with DefConstruction - with PackageConstruction + with PackageConstruction with ImportConstruction { val x: Tree = q"val x: Int" @@ -81,6 +81,10 @@ trait ClassConstruction { self: QuasiquoteProperties => assertEqAst(q" class C($privx)", " class C(x: Int) ") assertEqAst(q"case class C($privx)", "case class C(private[this] val x: Int)") } + + property("SI-8333") = test { + assertEqAst(q"{ $NoMods class C }", "{ class C }") + } } trait TraitConstruction { self: QuasiquoteProperties => |