mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
intersection type flattening: prefer non raw types (IDEA-95124)
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
interface BusinessEntity<E extends BusinessEntity<E>> {
|
||||
}
|
||||
|
||||
interface EntityId<E extends BusinessEntity> {
|
||||
E getEntity();
|
||||
}
|
||||
|
||||
public class MyTest {
|
||||
<T extends BusinessEntity<T>> T getEntity(EntityId<T> defaultValue) {
|
||||
return getEntityID(defaultValue).getEntity();
|
||||
}
|
||||
|
||||
public <P extends EntityId<?>> P getEntityID(P defaultValue) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -203,6 +203,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testSpecificReturnType() throws Exception { doTest17Incompatibility(false); }
|
||||
public void testParameterizedParameterBound() throws Exception { doTest17Incompatibility(false); }
|
||||
public void testInstanceClassInStaticContextAccess() throws Exception { doTest17Incompatibility(false); }
|
||||
public void testFlattenIntersectionType() throws Exception { doTest17Incompatibility(false); }
|
||||
|
||||
public void testJavaUtilCollections_NoVerify() throws Exception {
|
||||
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));
|
||||
|
||||
Reference in New Issue
Block a user