diff options
author | Martin Odersky <odersky@gmail.com> | 2009-03-13 19:15:50 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2009-03-13 19:15:50 +0000 |
commit | 30a27a479ee505d41e5598056dbaf99dd2c5ab05 (patch) | |
tree | 1f7ad6e0ee245755a020b15924fb110dcf38b063 /src/compiler/scala/tools/nsc/typechecker/Contexts.scala | |
parent | 1a1c5f5503761fde6918e0f5c81571cb09768561 (diff) | |
download | scala-30a27a479ee505d41e5598056dbaf99dd2c5ab05.tar.gz scala-30a27a479ee505d41e5598056dbaf99dd2c5ab05.tar.bz2 scala-30a27a479ee505d41e5598056dbaf99dd2c5ab05.zip |
Let package object members override package dir...
Let package object members override package directory members; plus
improvements that allow bottstrapping with a package object scala.
Refactored implicits.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Contexts.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index 213bbf173a..373716806b 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -210,6 +210,12 @@ trait Contexts { self: Analyzer => _undetparams = ps } + def extractUndetparams() = { + val tparams = undetparams + undetparams = List() + tparams + } + /** * @param unit ... * @param tree ... @@ -624,29 +630,6 @@ trait Contexts { self: Analyzer => } } - class ImplicitInfo(val name: Name, val pre: Type, val sym: Symbol) { - private var tpeCache: Type = null - def tpe: Type = { - if (tpeCache eq null) tpeCache = pre.memberType(sym) - tpeCache - } - override def equals(other: Any) = other match { - case that: ImplicitInfo => - if (this eq NoImplicitInfo) that eq this - else - this.name == that.name && - this.pre =:= that.pre && - this.sym == that.sym - case _ => - false - } - override def hashCode = - name.hashCode + pre.hashCode + sym.hashCode - override def toString = "ImplicitInfo(" + name + "," + pre + "," + sym + ")" - } - - val NoImplicitInfo = new ImplicitInfo(null, null, null) - case class ImportType(expr: Tree) extends Type { override def equals(that : Any) = that match { case ImportType(expr) => |