summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-06-06 02:05:10 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-06-08 15:23:11 +0200
commit1708a7fffdb653a638927c2b4ff30a7a0be0f3fe (patch)
tree1d270cc0b3c4a7424f2444a4d1dca460699abb6a /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parentfb67a1d3aea159fd39e5c0fad14ffa089a5d6ba5 (diff)
downloadscala-1708a7fffdb653a638927c2b4ff30a7a0be0f3fe.tar.gz
scala-1708a7fffdb653a638927c2b4ff30a7a0be0f3fe.tar.bz2
scala-1708a7fffdb653a638927c2b4ff30a7a0be0f3fe.zip
macros: refactoring of fast track infrastructure
As a result, hardwired macros don't need implementation stubs. This is very important, because in a few commits scala.reflect.makro.Context will move out from scala-library.jar. Also adding fast track entries doesn't require jumping through hoops with PDTs. It's as simple as defining PartialFunction[Tree, Any].
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index 6d9c9c4ce8..553294d0fe 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -1309,9 +1309,9 @@ abstract class RefChecks extends InfoTransform with reflect.internal.transform.R
}
List(tree1)
}
- case Import(_, _) => Nil
- case DefDef(mods, _, _, _, _, _) if (mods hasFlag MACRO) => Nil
- case _ => List(transform(tree))
+ case Import(_, _) => Nil
+ case DefDef(mods, _, _, _, _, _) if (mods hasFlag MACRO) || (tree.symbol hasFlag MACRO) => Nil
+ case _ => List(transform(tree))
}
/* Check whether argument types conform to bounds of type parameters */
@@ -1496,7 +1496,7 @@ abstract class RefChecks extends InfoTransform with reflect.internal.transform.R
private def transformCaseApply(tree: Tree, ifNot: => Unit) = {
val sym = tree.symbol
-
+
def isClassTypeAccessible(tree: Tree): Boolean = tree match {
case TypeApply(fun, targs) =>
isClassTypeAccessible(fun)
@@ -1505,7 +1505,7 @@ abstract class RefChecks extends InfoTransform with reflect.internal.transform.R
// the companion class is actually not a ClassSymbol, but a reference to an abstract type.
module.symbol.companionClass.isClass
}
-
+
val doTransform =
sym.isSourceMethod &&
sym.isCase &&