From 94e280dee6655f9d4242ab5fd1f46c97975c7182 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Wed, 26 Sep 2012 09:09:16 +0200 Subject: 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. --- test/files/run/macro-sip19-revised/Impls_Macros_1.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/files/run/macro-sip19-revised/Impls_Macros_1.scala') 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) } -- cgit v1.2.3