mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
anonym -> functional: allow cast to resolve overload resolution
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
// "Replace with lambda" "true"
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
abstract class LambdaConvert {
|
||||
|
||||
public abstract <T> T query(Function<Double, T> rse);
|
||||
|
||||
public void with() {
|
||||
add(query((Function<Double, String>) resultSet -> ""));
|
||||
}
|
||||
|
||||
public void add(String s) {}
|
||||
public void add(Integer i) {}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Replace with lambda" "false"
|
||||
// "Replace with lambda" "true"
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user