summaryrefslogtreecommitdiff
path: root/test/files/run/macro-sip19-revised/Impls_Macros_1.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-06-04 13:53:13 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-06-08 15:32:17 +0200
commit7b0f0a142bb526f4bd108a8c208ec9a8952398c9 (patch)
treeee13d036756be41521a9eb3f1e05898410ab744e /test/files/run/macro-sip19-revised/Impls_Macros_1.scala
parentd9103e01b467634d61baa3b131aeb93fca9e20a5 (diff)
downloadscala-7b0f0a142bb526f4bd108a8c208ec9a8952398c9.tar.gz
scala-7b0f0a142bb526f4bd108a8c208ec9a8952398c9.tar.bz2
scala-7b0f0a142bb526f4bd108a8c208ec9a8952398c9.zip
repairs the tests after the refactoring spree
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.scala10
1 files changed, 5 insertions, 5 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 e8f6e1df85..994421808e 100644
--- a/test/files/run/macro-sip19-revised/Impls_Macros_1.scala
+++ b/test/files/run/macro-sip19-revised/Impls_Macros_1.scala
@@ -2,16 +2,16 @@ import scala.reflect.makro.Context
object Macros {
def impl(c: Context) = {
- import c.mirror._
+ import c.universe._
- val inscope = c.inferImplicitValue(staticClass("SourceLocation").asType)
- val outer = Expr[SourceLocation](if (!inscope.isEmpty) inscope else Literal(Constant(null)))
+ val inscope = c.inferImplicitValue(c.mirror.staticClass("SourceLocation").asType)
+ 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 line = fun.pos.line
val charOffset = fun.pos.point
- c.reify { SourceLocation1(outer.eval, c.literal(fileName).eval, c.literal(line).eval, c.literal(charOffset).eval) }
+ c.reify { SourceLocation1(outer.splice, c.literal(fileName).splice, c.literal(line).splice, c.literal(charOffset).splice) }
}
implicit def sourceLocation: SourceLocation1 = macro impl
@@ -31,4 +31,4 @@ trait SourceLocation {
val charOffset: Int
}
-case class SourceLocation1(val outer: SourceLocation, val fileName: String, val line: Int, val charOffset: Int) extends SourceLocation
+case class SourceLocation1(val outer: SourceLocation, val fileName: String, val line: Int, val charOffset: Int) extends SourceLocation \ No newline at end of file