diff options
author | Den Shabalin <den.shabalin@gmail.com> | 2013-09-02 15:51:56 +0200 |
---|---|---|
committer | Den Shabalin <den.shabalin@gmail.com> | 2013-09-05 14:39:12 +0200 |
commit | 901cdc1855e8e80957b18add4991736b9f458d77 (patch) | |
tree | b6ac94c657f262d3a4e398e36b07d042ba4fbfa1 /test/files/scalacheck/quasiquotes/PatternConstructionProps.scala | |
parent | f9d5e3d4e8cca61ee75072ab13c2935061a1850e (diff) | |
download | scala-901cdc1855e8e80957b18add4991736b9f458d77.tar.gz scala-901cdc1855e8e80957b18add4991736b9f458d77.tar.bz2 scala-901cdc1855e8e80957b18add4991736b9f458d77.zip |
refine block and applied/typeapplied splicing/matching semantics
1. blocks now match single term-level expressions to account for
automatic block elimination. E.g.
val q"{ ..$stats }" = q"foo"
will match into stats = List(q"foo"). This is useful to uniformly
deal with blocks on term level.
2. blocks in quasiquotes collapse into single expressions
3. Applied and TypeApplied now have constructors too which helps
to unify matching and extraction in quasiquote reifier
4. TypeApplied now matches AppliedTypeTree too
5. Add Syntactic prefix to Applied and TypeApplied
Diffstat (limited to 'test/files/scalacheck/quasiquotes/PatternConstructionProps.scala')
-rw-r--r-- | test/files/scalacheck/quasiquotes/PatternConstructionProps.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/files/scalacheck/quasiquotes/PatternConstructionProps.scala b/test/files/scalacheck/quasiquotes/PatternConstructionProps.scala index aee50c9c5f..504cb2a77d 100644 --- a/test/files/scalacheck/quasiquotes/PatternConstructionProps.scala +++ b/test/files/scalacheck/quasiquotes/PatternConstructionProps.scala @@ -32,6 +32,6 @@ object PatternConstructionProps extends QuasiquoteProperties("pattern constructi } property("splice into casedef") = forAll { (pat: Tree, cond: Tree, body: Tree) => - cq"$pat if $cond => $body" ≈ CaseDef(pat, cond, Block(List(), body)) + cq"$pat if $cond => $body" ≈ CaseDef(pat, cond, body) } }
\ No newline at end of file |