diff options
author | schinz <schinz@epfl.ch> | 2003-02-21 09:23:29 +0000 |
---|---|---|
committer | schinz <schinz@epfl.ch> | 2003-02-21 09:23:29 +0000 |
commit | 168da72d528d2bf7a0436bef2452ce3a9abcda7e (patch) | |
tree | 1969cebcb155886199263f3092e44cd4eac4d6a1 | |
parent | af8181e6b33464138274f263a5ab1502571e5bc1 (diff) | |
download | scala-168da72d528d2bf7a0436bef2452ce3a9abcda7e.tar.gz scala-168da72d528d2bf7a0436bef2452ce3a9abcda7e.tar.bz2 scala-168da72d528d2bf7a0436bef2452ce3a9abcda7e.zip |
- bug fix: replaced pointer-based type equality...
- bug fix: replaced pointer-based type equality tests by calls to
isSameAs()
-rw-r--r-- | sources/scalac/ast/TreeGen.java | 2 | ||||
-rw-r--r-- | sources/scalac/symtab/Type.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java index 8491e9825a..d29903f14e 100644 --- a/sources/scalac/ast/TreeGen.java +++ b/sources/scalac/ast/TreeGen.java @@ -64,7 +64,7 @@ public class TreeGen implements Kinds, Modifiers { } public Tree mkRef(int pos, Type pre, Symbol sym) { - if (pre == Type.localThisType || pre.symbol().isRoot()) + if (pre.isSameAs(Type.localThisType) || pre.symbol().isRoot()) return Ident(pos, sym); else return Select(pos, mkStableId(pos, pre), sym); diff --git a/sources/scalac/symtab/Type.java b/sources/scalac/symtab/Type.java index 0fcca1acd2..8e44f1653a 100644 --- a/sources/scalac/symtab/Type.java +++ b/sources/scalac/symtab/Type.java @@ -1994,7 +1994,7 @@ public class Type implements Modifiers, Kinds, TypeTags { return "<notype>"; case ThisType(Symbol sym): if (sym.isRoot()) return "<root>.this.type"; - else if (this == localThisType) return "<local>.this.type"; + else if (isSameAs(localThisType)) return "<local>.this.type"; else { Type this1 = (Global.instance.debug) ? this : expandModuleThis(); if (this1 == this) return sym.nameString() + ".this.type"; @@ -2072,7 +2072,7 @@ public class Type implements Modifiers, Kinds, TypeTags { } private String prefixString() { - if ((this == localThisType || symbol().isRoot()) && !Global.instance.debug) { + if ((isSameAs(localThisType) || symbol().isRoot()) && !Global.instance.debug) { return ""; } else { String spre = toString(); |