summaryrefslogtreecommitdiff
path: root/test/files/run/macro-range
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-range
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-range')
-rw-r--r--test/files/run/macro-range/Common_1.scala3
-rw-r--r--test/files/run/macro-range/Expansion_Impossible_2.scala10
2 files changed, 6 insertions, 7 deletions
diff --git a/test/files/run/macro-range/Common_1.scala b/test/files/run/macro-range/Common_1.scala
index bd46e1f529..650257ae16 100644
--- a/test/files/run/macro-range/Common_1.scala
+++ b/test/files/run/macro-range/Common_1.scala
@@ -1,4 +1,3 @@
-import reflect.api.Modifier
import reflect.makro.Context
abstract class RangeDefault {
@@ -12,7 +11,7 @@ abstract class RangeDefault {
/** This class should go into reflect.macro once it is a bit more stable. */
abstract class Utils {
val context: Context
- import context.mirror._
+ import context.universe._
class TreeSubstituter(from: List[Symbol], to: List[Tree]) extends Transformer {
override def transform(tree: Tree): Tree = tree match {
diff --git a/test/files/run/macro-range/Expansion_Impossible_2.scala b/test/files/run/macro-range/Expansion_Impossible_2.scala
index 051afff99c..fecce6bc48 100644
--- a/test/files/run/macro-range/Expansion_Impossible_2.scala
+++ b/test/files/run/macro-range/Expansion_Impossible_2.scala
@@ -1,4 +1,3 @@
-import reflect.api.Modifier
import reflect.makro.Context
object Impls {
@@ -7,14 +6,15 @@ object Impls {
//println("macro-expand, _this = "+ _this)
object utils extends Utils { val context: c.type = c }
import utils._
- import c.mirror._
+ import c.universe._
+ import Flag._
- val initName = newTermName("<init>")
+ val initName = nme.CONSTRUCTOR
// Either:
// scala"{ var i = $low; val h = $hi; while (i < h) { $f(i); i = i + 1 } }
// or:
// scala"($_this: RangeDefault).foreach($f)"
- Expr(c.prefix.tree match {
+ c.Expr(c.prefix.tree match {
case Apply(Select(New(tpt), initName), List(lo, hi)) if tpt.symbol.fullName == "Range" =>
val iname = newTermName("$i")
val hname = newTermName("$h")
@@ -28,7 +28,7 @@ object Impls {
val generated =
Block(
List(
- ValDef(Modifiers(Set(Modifier.mutable)), iname, TypeTree(), lo),
+ ValDef(Modifiers(MUTABLE), iname, TypeTree(), lo),
ValDef(Modifiers(), hname, TypeTree(), hi)),
makeWhile(labelname, cond, body))
// todo. read the compiler config and print if -Ydebug is set