mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
check to prevent contradicted intersection type (IDEA-67600)
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
abstract class A<T, S extends T>
|
||||
{
|
||||
abstract S bar();
|
||||
void foo(A<Runnable[], ? extends Cloneable[]> a){
|
||||
<error descr="Incompatible types. Found: 'java.lang.Cloneable[]', required: 'java.lang.Runnable[]'">Runnable[] x = a.bar();</error>
|
||||
}
|
||||
}
|
||||
|
||||
abstract class AB<T, S extends T>
|
||||
{
|
||||
abstract S bar();
|
||||
void foo(AB<Runnable, ? extends Cloneable> a){
|
||||
Runnable x = a.bar();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class AC<T, S>
|
||||
{
|
||||
abstract S bar();
|
||||
void foo(AC<Runnable[], ? extends Cloneable[]> a){
|
||||
<error descr="Incompatible types. Found: 'java.lang.Cloneable[]', required: 'java.lang.Runnable[]'">Runnable[] x = a.bar();</error>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user