don't open captures on type computation (IDEA-154968)

This commit is contained in:
Anna.Kozlova
2016-04-20 17:49:29 +02:00
parent 1ab0c2bc8b
commit ee4f41b14c
19 changed files with 50 additions and 47 deletions
@@ -2,7 +2,7 @@ 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>
<error descr="Incompatible types. Found: 'capture<? extends java.lang.Cloneable[]>', required: 'java.lang.Runnable[]'">Runnable[] x = a.bar();</error>
}
}
@@ -18,7 +18,7 @@ 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>
<error descr="Incompatible types. Found: 'capture<? extends java.lang.Cloneable[]>', required: 'java.lang.Runnable[]'">Runnable[] x = a.bar();</error>
}
}