mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
type distinct prover for object/type parameter wildcard fixed IDEA-124363
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
import java.util.*;
|
||||
|
||||
class MyTClass {
|
||||
|
||||
<T> void foo(final List<Object> objects){
|
||||
Collection<? extends T> collection = (Collection<? extends T>) objects;
|
||||
}
|
||||
|
||||
<T> void foo1(final List<Object> objects){
|
||||
Collection<? super T> collection = (Collection<? super T>) objects;
|
||||
}
|
||||
|
||||
<T extends String> void bar(final List<Object> objects){
|
||||
Collection<? extends T> collection = <error descr="Inconvertible types; cannot cast 'java.util.List<java.lang.Object>' to 'java.util.Collection<? extends T>'">(Collection<? extends T>) objects</error>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user