diff options
author | Den Shabalin <den.shabalin@gmail.com> | 2013-09-05 14:38:31 +0200 |
---|---|---|
committer | Den Shabalin <den.shabalin@gmail.com> | 2013-09-05 20:42:11 +0200 |
commit | cdac66f750acb6fbf000215b8534f27f51da00a3 (patch) | |
tree | 48a977d3a0a575b3c1a76636a5360760de923a3f /test/files/scalacheck | |
parent | 230f36d9ca99abe33f4379ffd573702b2671f83a (diff) | |
download | scala-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')
-rw-r--r-- | test/files/scalacheck/quasiquotes/DefinitionConstructionProps.scala | 10 |
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 |