mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 13:15:25 +07:00
method references: avoid double substitution (IDEA-126062)
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
import java.util.function.Consumer;
|
||||
class Pipeline<I, O> implements Consumer<I> {
|
||||
@Override public final void accept(I input) {}
|
||||
|
||||
public <K> void then(Pipeline<O, K> pipeline, final Observable<O> observable) {
|
||||
observable.subscribe(pipeline::accept);
|
||||
}
|
||||
}
|
||||
|
||||
interface Observable<T> {
|
||||
void subscribe(Consumer<T> x);
|
||||
}
|
||||
+4
@@ -257,6 +257,10 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testIDEA126062() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user