mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed cast to paraemeter type in evaluation
This commit is contained in:
+9
-7
@@ -1080,15 +1080,17 @@ public class EvaluatorBuilderImpl implements EvaluatorBuilder {
|
||||
|
||||
final boolean performCastToWrapperClass = shouldPerformBoxingConversion && !castingToPrimitive;
|
||||
|
||||
String castTypeName = castType.getCanonicalText();
|
||||
if (performCastToWrapperClass) {
|
||||
final PsiPrimitiveType unboxedType = PsiPrimitiveType.getUnboxedType(castType);
|
||||
if (unboxedType != null) {
|
||||
castTypeName = unboxedType.getCanonicalText();
|
||||
if (!(PsiUtil.resolveClassInClassTypeOnly(castType) instanceof PsiTypeParameter)) {
|
||||
String castTypeName = castType.getCanonicalText();
|
||||
if (performCastToWrapperClass) {
|
||||
final PsiPrimitiveType unboxedType = PsiPrimitiveType.getUnboxedType(castType);
|
||||
if (unboxedType != null) {
|
||||
castTypeName = unboxedType.getCanonicalText();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
myResult = new TypeCastEvaluator(operandEvaluator, castTypeName, castingToPrimitive);
|
||||
myResult = new TypeCastEvaluator(operandEvaluator, castTypeName, castingToPrimitive);
|
||||
}
|
||||
|
||||
if (performCastToWrapperClass) {
|
||||
myResult = new BoxingEvaluator(myResult);
|
||||
|
||||
Reference in New Issue
Block a user