summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sources/scalac/ast/TreeGen.java2
-rw-r--r--sources/scalac/symtab/Type.java4
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();