resolve optimization: distinguish different methods in hashCode (IDEA-109409)

This commit is contained in:
Anna Kozlova
2013-06-28 13:57:55 +04:00
parent d932157762
commit ffb607f18d
2 changed files with 8 additions and 0 deletions

View File

@@ -92,6 +92,13 @@ public abstract class MethodSignatureBase implements MethodSignature {
final PsiType[] parameterTypes = getParameterTypes();
result += 37 * parameterTypes.length;
PsiType firstParamType = parameterTypes.length == 0 ? null : parameterTypes[0];
if (firstParamType != null) {
//to avoid type parameters with different names conflict
final PsiType[] erasedTypes = myErasedParameterTypes;
firstParamType = erasedTypes != null ? erasedTypes[0] : TypeConversionUtil.erasure(firstParamType, mySubstitutor);
result += 37 * firstParamType.hashCode();
}
return result;
}