summaryrefslogtreecommitdiff
path: root/sources/scalac/symtab
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-10-08 13:21:46 +0000
committerpaltherr <paltherr@epfl.ch>2003-10-08 13:21:46 +0000
commited28110153269312ccf587153a988e9a1c67f692 (patch)
tree6f475cf054c689b22aa76614eef9cc0cb005d5a9 /sources/scalac/symtab
parentfebb62721c74d18c16933012dd2d09f7a5af2ed6 (diff)
downloadscala-ed28110153269312ccf587153a988e9a1c67f692.tar.gz
scala-ed28110153269312ccf587153a988e9a1c67f692.tar.bz2
scala-ed28110153269312ccf587153a988e9a1c67f692.zip
- Fixed prefix handling for TypeAliases and Abs...
- Fixed prefix handling for TypeAliases and AbstractTypes
Diffstat (limited to 'sources/scalac/symtab')
-rw-r--r--sources/scalac/symtab/Type.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/sources/scalac/symtab/Type.java b/sources/scalac/symtab/Type.java
index 578c628996..e9e4d3b024 100644
--- a/sources/scalac/symtab/Type.java
+++ b/sources/scalac/symtab/Type.java
@@ -1039,13 +1039,7 @@ public class Type implements Modifiers, Kinds, TypeTags, EntryTags {
//System.out.println(t + ".toInstance(" + pre + "," + clazz + ") = " + t1);//DEBUG
return t1;
} else {
- Type prefix1 = prefix;
- if (!local) {
- prefix1 = apply(prefix);
- } else if (sym.isAbstractType()) {
- prefix = sym.owner().thisType();
- prefix1 = prefix.asSeenFrom(pre, sym.owner());
- }
+ Type prefix1 = apply(prefix);
Type[] args1 = map(args);
if (prefix1 == prefix && args1 == args) return t;
Symbol sym1 = (sym.flags & MODUL) == 0 ? prefix1.rebind(sym) : sym;
@@ -1059,8 +1053,8 @@ public class Type implements Modifiers, Kinds, TypeTags, EntryTags {
// outer), we can just replace args by the
// outer type params of sym1.
args1 = asSeenFrom(Symbol.type(sym1.owner().typeParams()), pre, sym1.owner());
+ if (sym1.isClassType()) prefix1 = localThisType;
}
- if (local) prefix1 = localThisType;
Type t1 = typeRef(prefix1, sym1, args1);
if (sym1 != sym) t1 = apply(t1.unalias());
return t1;