mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
java completion: fix double T[] suggestion in toArray((<caret>)casted)
GitOrigin-RevId: 8c56d0e78ae8f0d027ca428165753b5db2fda543
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d81527a685
commit
d2f33b5f06
@@ -1074,6 +1074,9 @@ public class ExpectedTypesProvider {
|
||||
if (params.length <= index) continue;
|
||||
PsiParameter param = params[index];
|
||||
PsiType paramType = getParameterType(param, substitutor);
|
||||
if (method.hasTypeParameters() && PsiTypesUtil.mentionsTypeParameters(paramType, ContainerUtil.newHashSet(method.getTypeParameters()))) {
|
||||
continue;
|
||||
}
|
||||
TailType tailType = getMethodArgumentTailType(argument, index, method, substitutor, params);
|
||||
ExpectedTypeInfoImpl info = createInfoImpl(paramType, ExpectedTypeInfo.TYPE_OR_SUBTYPE, paramType,
|
||||
tailType, method, getPropertyName(param));
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
public class SomeClass {
|
||||
|
||||
{
|
||||
java.util.List<Unresolved> l;
|
||||
Unresolved[] a = l.toArray((<caret>)expr);
|
||||
}
|
||||
|
||||
}
|
||||
+2
@@ -298,4 +298,6 @@ public void testConvertToObjectStream() {
|
||||
public void testNestedCollectorsCounting() { doTest(false); }
|
||||
|
||||
public void testFilterInaccessibleConstructors() { doAntiTest(); }
|
||||
|
||||
public void testCastInToArrayCallWithUnresolvedType() { doAntiTest(); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user