mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
simplified isAssignable check
This commit is contained in:
@@ -893,9 +893,6 @@ public class TypeConversionUtil {
|
||||
PsiSubstitutor leftSubstitutor = leftResult.getSubstitutor();
|
||||
|
||||
if (!leftClass.getManager().areElementsEquivalent(leftClass, rightClass)) {
|
||||
if (!allowUncheckedConversion && PsiUtil.isRawSubstitutor(leftClass, leftSubstitutor) && !rightClass.hasTypeParameters() && !(rightClass instanceof PsiTypeParameter)) {
|
||||
return false;
|
||||
}
|
||||
rightSubstitutor = getSuperClassSubstitutor(leftClass, rightClass, rightSubstitutor);
|
||||
rightClass = leftClass;
|
||||
}
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
interface Foo {
|
||||
String getText(Map attributes) throws IOException;
|
||||
String getText(Properties attributes) throws IOException;
|
||||
}
|
||||
|
||||
class Bar {
|
||||
void foo(Foo foo, Properties prop) throws IOException {
|
||||
foo.getText(prop);
|
||||
}
|
||||
}
|
||||
public abstract class Hashtable<K,V> implements Map<K,V>, Cloneable {
|
||||
}
|
||||
|
||||
public abstract class Properties extends Hashtable<Object,Object> {
|
||||
}
|
||||
@@ -314,6 +314,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testBoxingSpecific() { doTest5(false); }
|
||||
public void testIDEA67843() { doTest5(false); }
|
||||
public void testAmbiguousTypeParamVsConcrete() { doTest5(false); }
|
||||
public void testRawAssignments() throws Exception { doTest5(false); }
|
||||
|
||||
public void testJavaUtilCollections_NoVerify() throws Exception {
|
||||
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));
|
||||
|
||||
Reference in New Issue
Block a user