mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
proceed with wildcards separately to raw types: don't abuse erasure which should leave wildcard types as is
This commit is contained in:
@@ -1162,7 +1162,8 @@ public class ExpectedTypesProvider {
|
||||
if (className != null && className.startsWith("Log")) {
|
||||
if (parameterType instanceof PsiClassType) {
|
||||
PsiType typeArg = PsiUtil.substituteTypeParameter(parameterType, CommonClassNames.JAVA_LANG_CLASS, 0, true);
|
||||
if (typeArg != null && TypeConversionUtil.erasure(typeArg).equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) {
|
||||
if (typeArg instanceof PsiWildcardType && !((PsiWildcardType)typeArg).isBounded() ||
|
||||
typeArg != null && TypeConversionUtil.erasure(typeArg).equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) {
|
||||
PsiClass placeClass = PsiTreeUtil.getContextOfType(argument, PsiClass.class);
|
||||
PsiClass classClass = ((PsiClassType)parameterType).resolve();
|
||||
if (placeClass != null && classClass != null) {
|
||||
|
||||
Reference in New Issue
Block a user