summaryrefslogtreecommitdiff
path: root/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala
diff options
context:
space:
mode:
authorDen Shabalin <den.shabalin@gmail.com>2013-09-05 14:38:31 +0200
committerDen Shabalin <den.shabalin@gmail.com>2013-09-05 20:42:11 +0200
commitcdac66f750acb6fbf000215b8534f27f51da00a3 (patch)
tree48a977d3a0a575b3c1a76636a5360760de923a3f /test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala
parent230f36d9ca99abe33f4379ffd573702b2671f83a (diff)
downloadscala-cdac66f750acb6fbf000215b8534f27f51da00a3.tar.gz
scala-cdac66f750acb6fbf000215b8534f27f51da00a3.tar.bz2
scala-cdac66f750acb6fbf000215b8534f27f51da00a3.zip
streamline implementation of annotation splicing
Syntax spec mislead me to believe that annotation can't have type parameters or multiple argument lists... I guess the lesson here is don't trust the spec.
Diffstat (limited to 'test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala')
-rw-r--r--test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala b/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala
index 96105b9581..153e23d947 100644
--- a/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala
+++ b/test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala
@@ -280,4 +280,14 @@ trait MethodConstruction { self: QuasiquoteProperties =>
q"@$a(y) def foo"
}
}
+
+ property("splice annotation with targs") = test {
+ val a = q"new Foo[A, B]"
+ assertEqAst(q"@$a def foo", "@Foo[A,B] def foo")
+ }
+
+ property("splice annotation with multiple argument lists") = test{
+ val a = q"new Foo(a)(b)"
+ assertEqAst(q"@$a def foo", "@Foo(a)(b) def foo")
+ }
} \ No newline at end of file