Type constructors with different counts of type parameters are not equal from now.

This commit is contained in:
Stanislav Erokhin
2016-06-29 19:01:40 +03:00
parent 8193032ffb
commit ebe9e6db37
@@ -69,6 +69,10 @@ public abstract class AbstractClassTypeConstructor extends AbstractTypeConstruct
// performance optimization: getFqName is slow method
if (other.hashCode() != hashCode()) return false;
// Sometimes we can get two classes from different modules with different counts of type parameters.
// To avoid problems in type checker we suppose that it is different type constructors.
if (((TypeConstructor) other).getParameters().size() != getParameters().size()) return false;
ClassifierDescriptor myDescriptor = getDeclarationDescriptor();
ClassifierDescriptor otherDescriptor = ((TypeConstructor) other).getDeclarationDescriptor();