Merge pull request #53 from aaandrewww/master
Fix bug in ClassHierarchy.getLeastCommonSuperClass and imprecision in type inference
This commit is contained in:
commit
8e33a70c91
|
@ -49,6 +49,10 @@ public class PointType extends TypeAbstraction {
|
|||
}
|
||||
} else if (rhs instanceof ConeType) {
|
||||
ConeType other = (ConeType) rhs;
|
||||
if (type.equals(other.getType())) {
|
||||
// "this" and the cone type have the same underlying type, return the cone type
|
||||
return other;
|
||||
}
|
||||
TypeReference T = other.getType().getReference();
|
||||
if (type.isArrayClass() || T.isArrayType()) {
|
||||
// give up on arrays. We don't care anyway.
|
||||
|
|
|
@ -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