mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 08:09:39 +07:00
type casts: check type parameter first (IDEA-58454)
This commit is contained in:
@@ -466,6 +466,15 @@ public class Test {
|
||||
W<? extends A> y = ( W<? extends A>) x;
|
||||
W<?> y1 = (W<?>)x;
|
||||
}
|
||||
|
||||
void testTypeParams() {
|
||||
class MyClass<K, V> {
|
||||
MyClass<K, V> convert(MyClass<? super K, ? super V> arg) {
|
||||
MyClass<K, V> result = (MyClass<K, V>)arg;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class W<T> {}
|
||||
|
||||
Reference in New Issue
Block a user