This commit is contained in:
Anna Kozlova
2016-02-18 16:51:02 +01:00
parent af014cf5c5
commit ef90033b1a
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import java.util.List;
class Foo<K> {
static <E> Foo<E> from(Iterable<? extends E> iterable) {
return null;
}
void m(Iterable<? extends String> arguments, List<String> list){
from(arguments).append<error descr="'append(java.lang.Iterable<? extends capture<? extends java.lang.String>>)' in 'Foo' cannot be applied to '(java.util.List<java.lang.String>)'">( list)</error>;
}
Foo<K> append(Iterable<? extends K> other) {
return null;
}
}

View File

@@ -395,6 +395,10 @@ public class GraphInferenceHighlightingTest extends LightDaemonAnalyzerTestCase
doTest();
}
public void testCapturedVariablesAcceptance() throws Exception {
doTest();
}
private void doTest() throws Exception {
doTest(false);
}