public override bool Equals(object obj) { if (!(obj is TypingDictionaryType other)) { return(false); } if ((KeyType.IsGenericParameter() && ValueType.IsGenericParameter()) || (other.KeyType.IsGenericParameter() && other.ValueType.IsGenericParameter())) { // Generic match - i.e. Mapping[K, V] matches Dict[int, str]. return(true); } return(PythonTypeComparer.Instance.Equals(KeyType, other.KeyType) && PythonTypeComparer.Instance.Equals(ValueType, other.ValueType)); }