diff options
author | Denys Shabalin <denys.shabalin@typesafe.com> | 2014-05-21 16:33:58 +0200 |
---|---|---|
committer | Denys Shabalin <denys.shabalin@typesafe.com> | 2014-05-21 16:37:03 +0200 |
commit | 56ed4fc79580d4a0b7a264a436db3010543a9211 (patch) | |
tree | 502a30992fa4c89082457c9823ed7e1f3df20c6b /.travis.yml | |
parent | 6c99037952766c7075b48171fe65a6077cf6b9f5 (diff) | |
download | scala-56ed4fc79580d4a0b7a264a436db3010543a9211.tar.gz scala-56ed4fc79580d4a0b7a264a436db3010543a9211.tar.bz2 scala-56ed4fc79580d4a0b7a264a436db3010543a9211.zip |
SI-8609 Fix flattening of definitions and imports in quasiquotes
Quasiquotes allow to unquote trees with ..$ with block flattening
semantics to simplify composition:
val onetwo = q"1; 2"
val onetwothree = q"..$onetwo; 3" // same as q"1; 2; 3"
If there is no block it will be equivalent to $ unquoting:
val one = q"1"
val onetwo = q"..$one; 2" // same as q"1; 2"
But the inconsistency here is that currently only terms support
this single-element semantics. This commit extends this functionality
to also support definitions and imports. So that following code works:
val q1 = q"val x = 1"
val q2 = q"..$q1; val y = 2" // same as q"val x = 1; val y = 2"
Diffstat (limited to '.travis.yml')
0 files changed, 0 insertions, 0 deletions