Exception fix (equal returns true for the same types) #EA-65206 Fixed

This commit is contained in:
Mikhail Glukhikh
2015-06-02 10:38:04 +03:00
parent bb49bfcea9
commit 46d5290f70
4 changed files with 26 additions and 0 deletions
@@ -70,6 +70,7 @@ public class TypeCheckingProcedure {
}
public boolean equalTypes(@NotNull JetType type1, @NotNull JetType type2) {
if (type1 == type2) return true;
if (TypesPackage.isFlexible(type1)) {
if (TypesPackage.isFlexible(type2)) {
return !type1.isError() && !type2.isError() && isSubtypeOf(type1, type2) && isSubtypeOf(type2, type1);