Fixing bug in ClassHierarchy.getLeastCommonSuperclass
If C1 extends C2 extends C3 getLeastCommonSuperClass(C1,C2) would give C3 instead of C2
This commit is contained in:
parent
b29bc2dac0
commit
c3202533f7
|
@ -769,7 +769,7 @@ public class ClassHierarchy implements IClassHierarchy {
|
|||
}
|
||||
IClass aa = a;
|
||||
while (aa != null) {
|
||||
if (superB.contains(aa)) {
|
||||
if (b.equals(aa) || superB.contains(aa)) {
|
||||
return aa;
|
||||
}
|
||||
aa = aa.getSuperclass();
|
||||
|
|
Loading…
Reference in New Issue