mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 02:38:59 +07:00
[java-highlighting] Do not report lambda return value error if its return type contains unsubstituted type variable
Fixes IDEA-310129 IDE hint a wrong position of Java method param compile error Also: AdaptExpressionTypeFixUtil: try to determine wrong parameter even if several parameter types mention type parameter Also: AdaptExpressionTypeFixUtil: new type mismatch fix to replace call with qualifier GitOrigin-RevId: fbc63c0eb3415983ccf52ed5ade15b5895b65b21
This commit is contained in:
committed by
intellij-monorepo-bot
parent
099b26f082
commit
b2dfb4c8a8
@@ -0,0 +1,13 @@
|
||||
// "Replace 3rd argument with qualifier" "true-preview"
|
||||
import java.util.function.Predicate;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
class X {
|
||||
public static String getOrDefault(String prefer, Supplier<String> def) {
|
||||
return getOrDefault(() -> prefer, String::isEmpty, def);
|
||||
}
|
||||
|
||||
public static <T> T getOrDefault(Supplier<T> prefer, Predicate<T> abandon, Supplier<T> def) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Replace 3rd argument with qualifier" "true-preview"
|
||||
import java.util.function.Predicate;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
class X {
|
||||
public static String getOrDefault(String prefer, Supplier<String> def) {
|
||||
return getOrDefault(() -> prefer, String::isEmpty, def<caret>.get());
|
||||
}
|
||||
|
||||
public static <T> T getOrDefault(Supplier<T> prefer, Predicate<T> abandon, Supplier<T> def) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user