mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
backward slices: types can be convertible through autoboxing here, though T t = 1 should be prohibited
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user