lambda: do not override already inferred types from parent (IDEA-92733)

This commit is contained in:
Anna Kozlova
2012-10-12 17:31:16 +02:00
parent 59d8eafbce
commit 289ee1d04c
3 changed files with 28 additions and 2 deletions
@@ -0,0 +1,19 @@
class LambdaTest {
public void highlightsTheBug(Stream<String> stream) {
stream.flatMap((Block<? super String> sink, String element) -> {});
}
public interface Block<B> {
void apply(B t);
}
public interface Stream<S> {
<R> Stream<R> flatMap(FlatMapper<? super S, R> mapper);
}
public interface FlatMapper<F, R> {
void flatMapInto(Block<? super R> sink, F element);
}
}