From 8ea3a4627c7dc66f65705ec9822c01a2225eacae Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 23 Mar 2013 16:45:10 +0100 Subject: Attempt to fix fingerprint problem (disabled for now) --- src/dotty/tools/dotc/core/TypeOps.scala | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/dotty/tools/dotc/core/TypeOps.scala') diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala index 38da0ce9c..c19b0e387 100644 --- a/src/dotty/tools/dotc/core/TypeOps.scala +++ b/src/dotty/tools/dotc/core/TypeOps.scala @@ -165,7 +165,8 @@ trait TypeOps { this: Context => * to a list of typerefs, by converting all refinements to member * definitions in scope `decls`. Can add members to `decls` as a side-effect. */ - def normalizeToRefs(parents: List[Type], cls: ClassSymbol, decls: MutableScope): List[TypeRef] = { + def normalizeToRefs(parents: List[Type], cls: ClassSymbol, decls: MutableScope /*@@@*/): List[TypeRef] = { + // println(s"normalizing $parents of $cls in ${cls.owner}") // !!! DEBUG var refinements = Map[TypeName, Type]() var formals = Map[TypeName, Symbol]() def normalizeToRef(tp: Type): TypeRef = tp match { @@ -183,12 +184,13 @@ trait TypeOps { this: Context => throw new TypeError(s"unexpected parent type: $tp") } val parentRefs = parents map normalizeToRef - for ((name, tpe) <- refinements) decls.enter { + for ((name, tpe) <- refinements) { val formal = formals(name) val bounds = tpe //.toRHS(formal) assert(decls.lookup(name) == NoSymbol, // DEBUG - s"redefinition of ${decls.lookup(name).debugString} in ${cls.debugString}") - ctx.newSymbol(cls, name, formal.flags & RetainedTypeArgFlags, bounds) + s"redefinition of ${decls.lookup(name).debugString} in ${cls.showLocated}") + val sym = ctx.newSymbol(cls, name, formal.flags & RetainedTypeArgFlags, bounds) + decls.enter(sym) // @@@ cls.enter(sym, decls) } parentRefs } -- cgit v1.2.3