summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-10-03 11:19:47 +0000
committerpaltherr <paltherr@epfl.ch>2003-10-03 11:19:47 +0000
commit169b9a7ebe91aab60a2f4d21b2eeb34e5e27dec2 (patch)
tree9c0be0c85e89e94452e172a0e013100ccf579e39 /sources
parentfa256a1af8da127154558aa15ef5eefac0c15ca4 (diff)
downloadscala-169b9a7ebe91aab60a2f4d21b2eeb34e5e27dec2.tar.gz
scala-169b9a7ebe91aab60a2f4d21b2eeb34e5e27dec2.tar.bz2
scala-169b9a7ebe91aab60a2f4d21b2eeb34e5e27dec2.zip
- Fixed AsSeenFrom for rebound nested classes w...
- Fixed AsSeenFrom for rebound nested classes with outer type params
Diffstat (limited to 'sources')
-rw-r--r--sources/scalac/symtab/Type.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/sources/scalac/symtab/Type.java b/sources/scalac/symtab/Type.java
index 8be3dcd00a..2a5ff38def 100644
--- a/sources/scalac/symtab/Type.java
+++ b/sources/scalac/symtab/Type.java
@@ -1044,6 +1044,17 @@ public class Type implements Modifiers, Kinds, TypeTags, EntryTags {
Type[] args1 = map(args);
if (prefix1 == prefix && args1 == args) return t;
Symbol sym1 = (sym.flags & MODUL) == 0 ? prefix1.rebind(sym) : sym;
+ if (local && sym != sym1) {
+ // Here what we should do is remove the outer
+ // type links of sym from args and then add
+ // the outer type links of sym1 to
+ // args. However, as currently type symbols
+ // that can be rebound can't have type
+ // arguments (excepted those added by explicit
+ // outer), we can just replace args by the
+ // outer type params of sym1.
+ args1 = asSeenFrom(Symbol.type(sym1.owner().typeParams()), pre, sym1.owner());
+ }
if (local) prefix1 = localThisType;
return typeRef(prefix1, sym1, args1);
}