mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
anonym -> lambda: disable in case when inferred type differs from type of anonymous class and parameter of param type is used inside (IDEA-127603);
BTW param.toString would be also rejected
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
// "Replace with lambda" "false"
|
||||
import java.util.function.Function;
|
||||
|
||||
class Test {
|
||||
void ab() {
|
||||
comparing(new Func<caret>tion<Integer, String>() {
|
||||
public String apply(Integer pObj) {
|
||||
return Integer.toString(pObj);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
static <T> void comparing(Function<T, String> keyExtractor){}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user