diff options
author | Martin Odersky <odersky@gmail.com> | 2004-07-06 14:17:48 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2004-07-06 14:17:48 +0000 |
commit | 40db5ce7419683e7d336dbd3f3fe793bf7ae4d65 (patch) | |
tree | 9d98877248b4b3c683c85a6266febc6a3eec024e /sources/scalac/typechecker/RefCheck.java | |
parent | b5127bbfea6df39af5db3dc45bb9f7e698acb3f1 (diff) | |
download | scala-40db5ce7419683e7d336dbd3f3fe793bf7ae4d65.tar.gz scala-40db5ce7419683e7d336dbd3f3fe793bf7ae4d65.tar.bz2 scala-40db5ce7419683e7d336dbd3f3fe793bf7ae4d65.zip |
*** empty log message ***
Diffstat (limited to 'sources/scalac/typechecker/RefCheck.java')
-rw-r--r-- | sources/scalac/typechecker/RefCheck.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sources/scalac/typechecker/RefCheck.java b/sources/scalac/typechecker/RefCheck.java index dc383e5067..0a35ae25a8 100644 --- a/sources/scalac/typechecker/RefCheck.java +++ b/sources/scalac/typechecker/RefCheck.java @@ -116,12 +116,10 @@ public class RefCheck extends Transformer implements Modifiers, Kinds { if (member1.kind == VAL) { Type self = clazz.thisType(); Type otherinfo = normalizedInfo(self, other); - Type template = resultToAny(otherinfo); switch (member1.info()) { case OverloadedType(Symbol[] alts, _): for (int i = 0; i < alts.length; i++) { - if (normalizedInfo(self, alts[i]).isSubType(template) /*&& - alts[i].owner() == member1.owner()*/) { + if (normalizedInfo(self, alts[i]).overrides(otherinfo)) { if (member == other) member = alts[i]; else @@ -136,7 +134,7 @@ public class RefCheck extends Transformer implements Modifiers, Kinds { } break; default: - if (normalizedInfo(self, member1).isSubType(template)) { + if (normalizedInfo(self, member1).overrides(otherinfo)) { member = member1; } } @@ -212,7 +210,7 @@ public class RefCheck extends Transformer implements Modifiers, Kinds { * M must be labelled `abstract override'. */ void checkOverride(int pos, Symbol clazz, Symbol member, Symbol other) { - //System.out.println(member + member.locationString() + " overrides " + other + other.locationString() + " in " + clazz);//debug + //System.out.println(member + ":" + member.type() + member.locationString() + " overrides " + other + ":" + other.type() + other.locationString() + " in " + clazz);//DEBUG if (member.owner() == clazz) pos = member.pos; else { |