[java-highlighting] Better actual type definition; fixes for some type mismatch in collectors

GitOrigin-RevId: 3652f4511a067b86bc9138f492a2a88cded09de0
This commit is contained in:
Tagir Valeev
2022-08-05 14:48:35 +02:00
committed by intellij-monorepo-bot
parent 099133f6e2
commit a0bc3ee404
15 changed files with 120 additions and 50 deletions

View File

@@ -12,7 +12,7 @@ import java.util.function.Function;
class Test {
{
valueOf(<error descr="Incompatible types. Found: 'java.lang.Object', required: 'char[]'">processFirst(x -> x)</error>);
valueOf(<error descr="Incompatible types. Found: 'java.lang.Integer', required: 'char[]'">processFirst(x -> x)</error>);
}
public static <V> V processFirst(Function<Integer,V> f){

View File

@@ -6,7 +6,7 @@ import java.util.stream.Stream;
class Test {
void foo() {
log(<error descr="Incompatible types. Found: 'java.lang.Object', required: 'java.lang.String[]'">get(TreeSet<String>::new)</error>);
log(<error descr="Incompatible types. Found: 'java.util.TreeSet<java.lang.String>', required: 'java.lang.String[]'">get(TreeSet<String>::new)</error>);
}
private void log(String params[]) {