mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-27 19:28:58 +07:00
introduce code block parameter: try to infer SAM type by extracted method parameter types
This commit is contained in:
+4
-4
@@ -1,16 +1,16 @@
|
||||
import java.util.function.IntConsumer;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
class Test {
|
||||
void bar() {
|
||||
foo(1, new java.util.function.IntConsumer() {
|
||||
public void accept(int i) {
|
||||
foo(1, new java.util.function.Consumer<Integer>() {
|
||||
public void accept(Integer i) {
|
||||
System.out.println(i);
|
||||
System.out.println(i);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void foo(int i, IntConsumer anObject){
|
||||
void foo(int i, Consumer<Integer> anObject){
|
||||
|
||||
anObject.accept(i);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user