backward slices: types can be convertible through autoboxing here, though T t = 1 should be prohibited

This commit is contained in:
anna
2011-08-25 19:26:08 +02:00
parent 2931ea305a
commit e8d3a96918
@@ -316,8 +316,12 @@ public class SliceUtil {
PsiSubstitutor combined = unify(substitutor, parentSubstitutor, project);
if (combined == null) return true;
PsiType substitited = combined.substitute(passExpression.getType());
if (substitited == null || !TypeConversionUtil.areTypesConvertible(substitited, actualType)) return true;
PsiType substituted = combined.substitute(passExpression.getType());
if (substituted instanceof PsiPrimitiveType) {
final PsiClassType boxedType = ((PsiPrimitiveType)substituted).getBoxedType(argumentList);
substituted = boxedType != null ? boxedType : substituted;
}
if (substituted == null || !TypeConversionUtil.areTypesConvertible(substituted, actualType)) return true;
return handToProcessor(passExpression, processor, parent, combined);
}