diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-10-17 19:12:59 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-10-18 16:58:51 +0200 |
commit | 3b4dc75710ac51de729224929690422d1b44e3ad (patch) | |
tree | 27337cd2a0a66e98650488a5cbff4e4dcb499745 /test/files/run/macro-system-properties.scala | |
parent | 54707cb45018170e31eb188a9a694ab9b0728f71 (diff) | |
download | scala-3b4dc75710ac51de729224929690422d1b44e3ad.tar.gz scala-3b4dc75710ac51de729224929690422d1b44e3ad.tar.bz2 scala-3b4dc75710ac51de729224929690422d1b44e3ad.zip |
deprecates raw tree manipulation facilities in macros.Context
Diffstat (limited to 'test/files/run/macro-system-properties.scala')
-rw-r--r-- | test/files/run/macro-system-properties.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/files/run/macro-system-properties.scala b/test/files/run/macro-system-properties.scala index e182defc81..31bcdf2600 100644 --- a/test/files/run/macro-system-properties.scala +++ b/test/files/run/macro-system-properties.scala @@ -7,7 +7,7 @@ object Test extends ReplTest { object GrabContext { def lastContext = Option(System.getProperties.get("lastContext").asInstanceOf[reflect.macros.runtime.Context]) // System.properties lets you stash true globals (unlike statics which are classloader scoped) - def impl(c: Context)() = { System.getProperties.put("lastContext", c); c.literalUnit } + def impl(c: Context)() = { import c.universe._; System.getProperties.put("lastContext", c); c.Expr[Unit](Literal(Constant(()))) } def grab() = macro impl } object Test { class C(implicit a: Any) { GrabContext.grab } } |