summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2011-07-19 13:57:37 +0000
committerMartin Odersky <odersky@gmail.com>2011-07-19 13:57:37 +0000
commit970d4132b66eb77fa0c3d1d2626a1e377bea6ad4 (patch)
tree1ca314de18a1436b1d62f1814fa5f3f70a0ec357 /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parent44b9cf0ca9606f531218deefe7792b4476552291 (diff)
downloadscala-970d4132b66eb77fa0c3d1d2626a1e377bea6ad4.tar.gz
scala-970d4132b66eb77fa0c3d1d2626a1e377bea6ad4.tar.bz2
scala-970d4132b66eb77fa0c3d1d2626a1e377bea6ad4.zip
Refactored infoTransformer functionality from n...
Refactored infoTransformer functionality from nsc.transform to reflect.internal.transform. Needed so that we can find Java methods that correspond to Scala methods. Review by extempore.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index bf6e7a91ba..8e1ee97387 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -37,7 +37,10 @@ import scala.collection.mutable.ListBuffer
*
* @todo Check whether we always check type parameter bounds.
*/
-abstract class RefChecks extends InfoTransform {
+abstract class RefChecks extends InfoTransform with reflect.internal.transform.RefChecks {
+
+ val global: Global // need to repeat here because otherwise last mixin defines global as
+ // SymbolTable. If we had DOT this would not be an issue
import global._
import definitions._
@@ -51,11 +54,10 @@ abstract class RefChecks extends InfoTransform {
new RefCheckTransformer(unit)
override def changesBaseClasses = false
- def transformInfo(sym: Symbol, tp: Type): Type =
- if (sym.isModule && !sym.isStatic) {
- sym setFlag (lateMETHOD | STABLE)
- NullaryMethodType(tp)
- } else tp
+ override def transformInfo(sym: Symbol, tp: Type): Type = {
+ if (sym.isModule && !sym.isStatic) sym setFlag (lateMETHOD | STABLE)
+ super.transformInfo(sym, tp)
+ }
val toJavaRepeatedParam = new TypeMap {
def apply(tp: Type) = tp match {