intersection type flattening: prefer non raw types (IDEA-95124)

This commit is contained in:
anna
2012-11-19 17:04:40 +01:00
parent 9cef655a6a
commit ed23e353b4
3 changed files with 19 additions and 1 deletions
@@ -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;
}
}