mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 06:39:38 +07:00
[java] fix change parameter class fix availability (IDEA-278909)
GitOrigin-RevId: 01ae90db563b7512c7ca1f7bd471ebd6f4c8f61f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a8590ad89f
commit
07c9d4f8de
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.codeInsight.daemon.impl.analysis;
|
||||
|
||||
import com.intellij.codeInsight.ExceptionUtil;
|
||||
@@ -1887,7 +1887,7 @@ public final class HighlightMethodUtil {
|
||||
PsiClass expressionClass = PsiUtil.resolveClassInType(expressionType);
|
||||
if (parameterClass == null || expressionClass == null) continue;
|
||||
if (expressionClass instanceof PsiAnonymousClass) continue;
|
||||
if (parameterClass.isInheritor(expressionClass, true)) continue;
|
||||
if (expressionClass.isInheritor(parameterClass, true)) continue;
|
||||
QuickFixAction.registerQuickFixAction(highlightInfo, QUICK_FIX_FACTORY.createChangeParameterClassFix(expressionClass, (PsiClassType)parameterType));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Make 'a' implement 'b'" "false"
|
||||
class a<T> implements b<T> {
|
||||
}
|
||||
interface b<T> { }
|
||||
class f {
|
||||
<K> void g(b<K> kb, java.util.List<K> l) {}
|
||||
void m(a<String> aa){
|
||||
g(a<caret>a, new Object());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user