diff options
author | paltherr <paltherr@epfl.ch> | 2004-02-01 15:57:10 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-02-01 15:57:10 +0000 |
commit | 131fc7ff568bc9e09542c28c3dd34cd6ccacb9bd (patch) | |
tree | 34d0abae824fcb1c28aacd0729a18d36e26e1949 /sources | |
parent | 43318b75bd2752db19925291d0f6195fb984260a (diff) | |
download | scala-131fc7ff568bc9e09542c28c3dd34cd6ccacb9bd.tar.gz scala-131fc7ff568bc9e09542c28c3dd34cd6ccacb9bd.tar.bz2 scala-131fc7ff568bc9e09542c28c3dd34cd6ccacb9bd.zip |
- Added normal vlink to non-stable modules
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scalac/transformer/ExplicitOuterClassesPhase.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sources/scalac/transformer/ExplicitOuterClassesPhase.java b/sources/scalac/transformer/ExplicitOuterClassesPhase.java index e2a94dc86a..0224d36f91 100644 --- a/sources/scalac/transformer/ExplicitOuterClassesPhase.java +++ b/sources/scalac/transformer/ExplicitOuterClassesPhase.java @@ -248,7 +248,7 @@ public class ExplicitOuterClassesPhase extends Phase { /** !!! */ public TypeContext(Symbol clasz, TypeContext[] outers, Symbol[] tlinks, Symbol vlink, Symbol[] oldtparams, Map tparams) { this.clasz = clasz; - this.isStable = clasz.isPackage() || clasz.isModuleClass(); + this.isStable = clasz.isPackage() || (clasz.isModuleClass() && vlink == null); this.outers = outers; this.tlinks = tlinks; this.vlink = vlink; @@ -319,13 +319,13 @@ public class ExplicitOuterClassesPhase extends Phase { if (clasz == Symbol.NONE) return type; if (clasz == context.clasz) return type; if (clasz.isPackage()) return Type.localThisType; + for (int i = 0; i < context.outers.length; i++) + if (clasz == context.outers[i].clasz) + return context.getTypeLink(i); if (clasz.isModuleClass()) { Type prefix = clasz.owner().thisType(); return Type.singleType(apply(prefix), clasz.module()); } - for (int i = 0; i < context.outers.length; i++) - if (clasz == context.outers[i].clasz) - return context.getTypeLink(i); throw Debug.abort("illegal ThisType", type); case CompoundType(Type[] parents, Scope members): // !!! this case should not be needed |