mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ignore type arguments on calls on raw types (IDEA-201219)
This commit is contained in:
@@ -341,6 +341,9 @@ public class MethodCandidateInfo extends CandidateInfo{
|
||||
}
|
||||
else {
|
||||
PsiTypeParameter[] typeParams = method.getTypeParameters();
|
||||
if (isRawSubstitution()) {
|
||||
return JavaPsiFacade.getElementFactory(method.getProject()).createRawSubstitutor(mySubstitutor, typeParams);
|
||||
}
|
||||
for (int i = 0; i < myTypeArguments.length && i < typeParams.length; i++) {
|
||||
incompleteSubstitutor = incompleteSubstitutor.put(typeParams[i], myTypeArguments[i]);
|
||||
}
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class RawTest<A> {
|
||||
public <T> T foo() {
|
||||
return null;
|
||||
}
|
||||
|
||||
void bar(RawTest x){
|
||||
<error descr="Incompatible types. Found: 'java.lang.Object', required: 'java.lang.String'">String a = x.<String>foo();</error>
|
||||
}
|
||||
}
|
||||
+1
@@ -1041,5 +1041,6 @@ public class GenericsHighlighting8Test extends LightDaemonAnalyzerTestCase {
|
||||
|
||||
public void testBridgeMethodOverriding() { doTest(); }
|
||||
public void testNestedWildcardsWithImplicitBounds() { doTest(); }
|
||||
public void testCallOnRawWithExplicitTypeArguments() { doTest(); }
|
||||
public void testNoCaptureConversionDuringDetectingSupertypesDeepInHierarchy() { doTest(); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user