mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-17 21:43:33 +07:00
move smart completion assignability checking closer to reference processor to fix
IDEADEV-40813 Smart completion inside "if" statement with "instanceof" in condition doesn't suggest method with generic return type
This commit is contained in:
@@ -792,6 +792,11 @@ public class JavaCompletionUtil {
|
||||
final PsiType qualifierType = getPsiType(element.getObject());
|
||||
final LookupItem lookupItem = element.as(LookupItem.class);
|
||||
if (lookupItem != null) {
|
||||
final Object o = lookupItem.getAttribute(LookupItem.TYPE);
|
||||
if (o instanceof PsiType) {
|
||||
return (PsiType)o;
|
||||
}
|
||||
|
||||
final PsiSubstitutor substitutor = (PsiSubstitutor)lookupItem.getAttribute(LookupItem.SUBSTITUTOR);
|
||||
if (substitutor != null) {
|
||||
return substitutor.substitute(qualifierType);
|
||||
|
||||
Reference in New Issue
Block a user