mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WrapWithAdapterMethodCallFix use variable type for cast
Fixes failing GenericsHighlightingTest.testIDEA124019
This commit is contained in:
+2
-1
@@ -61,7 +61,8 @@ public class WrapWithAdapterMethodCallFix extends LocalQuickFixAndIntentionActio
|
||||
!myOutTypeFilter.test(outType)) {
|
||||
return false;
|
||||
}
|
||||
PsiType resultType = createReplacement(context, "((" + inType.getCanonicalText() + ")null)").getType();
|
||||
PsiType resultType =
|
||||
createReplacement(context, "((" + GenericsUtil.getVariableTypeByExpressionType(inType).getCanonicalText() + ")null)").getType();
|
||||
return resultType != null && outType.isAssignableFrom(resultType);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user