mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 21:11:28 +07:00
[java-intentions] IDEA-365579 Extend class quick-fix shouldn't be shown, leads to a red code if executed
GitOrigin-RevId: 49fd47d8848d2241274262d926a967c14d900013
This commit is contained in:
committed by
intellij-monorepo-bot
parent
68c62875bd
commit
cb2bafc26f
@@ -543,6 +543,10 @@ public final class HighlightFixUtil {
|
||||
PsiClass expressionClass = PsiUtil.resolveClassInType(expressionType);
|
||||
if (parameterClass == null || expressionClass == null) continue;
|
||||
if (expressionClass instanceof PsiAnonymousClass) continue;
|
||||
if (expressionClass.equals(parameterClass)) {
|
||||
// The class might be the same, but type arguments are incompatible
|
||||
continue;
|
||||
}
|
||||
if (expressionClass.isInheritor(parameterClass, true)) continue;
|
||||
IntentionAction action = QuickFixFactory.getInstance().createChangeParameterClassFix(expressionClass, (PsiClassType)parameterType);
|
||||
info.accept(action);
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Make 'Descriptor' extend 'Descriptor'" "false"
|
||||
public class ProposeToExtend {
|
||||
public static <T> void send(Descriptor<T> descriptor) {
|
||||
sendImpl(<caret>descriptor, null);
|
||||
}
|
||||
|
||||
private static <T extends CharSequence> void sendImpl(Descriptor<T> descriptor, T value) {
|
||||
}
|
||||
}
|
||||
|
||||
class Descriptor<T extends CharSequence> {
|
||||
}
|
||||
Reference in New Issue
Block a user