This commit is contained in:
anna
2013-11-12 22:38:06 +01:00
parent 864e969120
commit 4496371ca3
3 changed files with 3 additions and 3 deletions
@@ -11,6 +11,6 @@ abstract class A1{
abstract <T> T baz(List<? super T> a);
void bar(List<?> x){
String o = baz<error descr="'baz(java.util.List<? super java.lang.String>)' in 'A1' cannot be applied to '(java.util.List<capture<?>>)'">(x)</error>;
String o = baz<error descr="'baz(java.util.List<? super java.lang.Object>)' in 'A1' cannot be applied to '(java.util.List<capture<?>>)'">(x)</error>;
}
}
@@ -10,7 +10,7 @@ class Test {
public void test(Set<MyConsumer> set) {
@SuppressWarnings("unchecked")
Map<Parent, MyConsumer<Parent>> map = <error descr="Inferred type 'T' for type parameter 'T' is not within its bound; should implement 'Test.Consumer<Test.Parent>'">create(set)</error>;
Map<Parent, MyConsumer<Parent>> map = create<error descr="'create(java.util.Set<T>)' in 'Test' cannot be applied to '(java.util.Set<Test.MyConsumer>)'">(set)</error>;
}
@@ -128,7 +128,7 @@ class Maps {
class Client {
void f(Date d) {
//this call should be OK
Maps.asMap(Maps.entry(fieldName(), "Test"),
<warning descr="Unchecked generics array creation for varargs parameter">Maps.asMap</warning>(Maps.entry(fieldName(), "Test"),
Maps.entry(fieldName(), 1),
Maps.entry(fieldName(), d));
}