aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Symbols.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-04-05 12:00:35 +0200
committerMartin Odersky <odersky@gmail.com>2013-04-05 12:00:35 +0200
commit485444245bfaf64684067e1e8a2e14787d52b974 (patch)
tree53254e04bb1533d614987687e5db3c16bf0b4c01 /src/dotty/tools/dotc/core/Symbols.scala
parent3ec42535daed5e876bd8d55276f1edf25e5bd41a (diff)
downloaddotty-485444245bfaf64684067e1e8a2e14787d52b974.tar.gz
dotty-485444245bfaf64684067e1e8a2e14787d52b974.tar.bz2
dotty-485444245bfaf64684067e1e8a2e14787d52b974.zip
Fix to superId.
Big blooper: superId was always -1.
Diffstat (limited to 'src/dotty/tools/dotc/core/Symbols.scala')
-rw-r--r--src/dotty/tools/dotc/core/Symbols.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index ecb2e2857..739d56d2f 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -179,9 +179,9 @@ trait Symbols { this: Context =>
def newStubSymbol(owner: Symbol, name: Name, file: AbstractFile = null): Symbol = {
def stubCompleter = new StubInfo()(condensed)
val normalizedOwner = if (owner is ModuleVal) owner.moduleClass else owner
- //println(s"creating stub for ${name.show}, owner = ${normalizedOwner.denot.debugString}, file = $file")
- //println(s"decls = ${normalizedOwner.preCompleteDecls.toList.map(_.debugString).mkString("\n ")}") // !!! DEBUG
- //throw new Error()
+ println(s"creating stub for ${name.show}, owner = ${normalizedOwner.denot.debugString}, file = $file")
+ println(s"decls = ${normalizedOwner.preCompleteDecls.toList.map(_.debugString).mkString("\n ")}") // !!! DEBUG
+ throw new Error()
val stub = name match {
case name: TermName =>
newModuleSymbol(normalizedOwner, name, EmptyFlags, EmptyFlags, stubCompleter, assocFile = file)
@@ -322,7 +322,7 @@ object Symbols {
* for all other symbols. To save memory, this method
* should be called only if class is a super class of some other class.
*/
- def superId: Int = -1
+ def superId(implicit ctx: Context): Int = -1
/** This symbol entered into owner's scope (owner must be a class). */
final def entered(implicit ctx: Context): this.type = {
@@ -403,7 +403,7 @@ object Symbols {
private var superIdHint: Int = -1
- def superId(implicit ctx: Context): Int = {
+ override def superId(implicit ctx: Context): Int = {
val hint = superIdHint
val key = this.typeConstructor
if (hint >= 0 && hint <= ctx.lastSuperId && (ctx.classOfId(hint) eq key))