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-sip19-revised/Impls_Macros_1.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-sip19-revised/Impls_Macros_1.scala')
-rw-r--r-- | test/files/run/macro-sip19-revised/Impls_Macros_1.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/files/run/macro-sip19-revised/Impls_Macros_1.scala b/test/files/run/macro-sip19-revised/Impls_Macros_1.scala index 8d7d3b5d3d..1b914ac797 100644 --- a/test/files/run/macro-sip19-revised/Impls_Macros_1.scala +++ b/test/files/run/macro-sip19-revised/Impls_Macros_1.scala @@ -11,7 +11,8 @@ object Macros { val fileName = fun.pos.source.file.file.getName val line = fun.pos.line val charOffset = fun.pos.point - c.universe.reify { SourceLocation1(outer.splice, c.literal(fileName).splice, c.literal(line).splice, c.literal(charOffset).splice) } + def literal[T](x: T) = c.Expr[T](Literal(Constant(x))) + c.universe.reify { SourceLocation1(outer.splice, literal(fileName).splice, literal(line).splice, literal(charOffset).splice) } } implicit def sourceLocation: SourceLocation1 = macro impl |