mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
ignore type parameters (arguments) in non-generic method references
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
abstract class Test {
|
||||
void p(final Stream<List<Integer>> stream){
|
||||
stream.flatMap(Collection::<String>stream);
|
||||
stream.flatMap(Collection::<<error descr="Unexpected wildcard">? extends String</error>>stream);
|
||||
stream.flatMap(Collection::<<error descr="Unexpected wildcard">?</error>>stream);
|
||||
stream.flatMap(Collection::<<error descr="Unexpected wildcard">? super String</error>>stream);
|
||||
}
|
||||
|
||||
static <T> void foo(T t) {}
|
||||
interface I {
|
||||
void m(String s);
|
||||
}
|
||||
|
||||
{
|
||||
I i = Test::<String>foo;
|
||||
I i1 = Test::<Integer><error descr="Cannot resolve method 'foo'">foo</error>;
|
||||
I i2 = Test::foo;
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user