diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-09-26 09:09:16 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-09-27 15:49:04 +0200 |
commit | 94e280dee6655f9d4242ab5fd1f46c97975c7182 (patch) | |
tree | 594620b7c95454afe0aa711ead450d3a2cd8c7ea /test/files/run/macro-sip19-revised/Impls_Macros_1.scala | |
parent | e9fbb661a3deb6e6234bdf94dce6fa98a205f3ca (diff) | |
download | scala-94e280dee6655f9d4242ab5fd1f46c97975c7182.tar.gz scala-94e280dee6655f9d4242ab5fd1f46c97975c7182.tar.bz2 scala-94e280dee6655f9d4242ab5fd1f46c97975c7182.zip |
exposes Position.source as SourceFile
It was useful to pretend that SourceFile isn't a part of the API,
when it's physical location was in scala-compiler.jar.
Afterwards Position and SourceFile have been moved to scala-reflect.jar,
and (what's more important) scala-reflect.jar gained experimental status,
meaning that we're not bound by backward compatibility in 2.10.0.
Therefore I'd say we should expose a full-fledged SourceFile in Position.source
(just as we do for Symbol.associatedFile) and later find out how to strip down
its interface to something suitable for public consumption.
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 | 2 |
1 files changed, 1 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 0793696fd4..5f3f61ca3f 100644 --- a/test/files/run/macro-sip19-revised/Impls_Macros_1.scala +++ b/test/files/run/macro-sip19-revised/Impls_Macros_1.scala @@ -8,7 +8,7 @@ object Macros { val outer = c.Expr[SourceLocation](if (!inscope.isEmpty) inscope else Literal(Constant(null))) val Apply(fun, args) = c.enclosingImplicits(0)._2 - val fileName = fun.pos.fileInfo.getName + 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) } |