summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala b/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala
index 153e23d947..ced479aef5 100644
--- a/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala
+++ b/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala
@@ -39,7 +39,9 @@ trait ClassConstruction { self: QuasiquoteProperties =>
assertEqAst(q"class Foo extends ..$parents", "class Foo")
}
- property("splice term name into class") = forAll { (name: TypeName) =>
+ property("splice term name into class") = forAll { (rname: TypeName) =>
+ // add prefix to avoid failure in case rname is keyword
+ val name = TypeName("prefix$" + rname)
eqAst(q"class $name", "class " + name.toString)
}