mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-11 11:36:59 +07:00
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only) GitOrigin-RevId: ed0cf0daf5dbfb034882d49ad5e9c03f264b451e
14 lines
552 B
Java
14 lines
552 B
Java
import java.util.*;
|
|
import java.util.Map.Entry;
|
|
import java.util.stream.Collectors;
|
|
|
|
// IDEA-362351
|
|
public class FriendlyMessageInBadInference {
|
|
void test(Map<Integer, Integer> someMap) {
|
|
use(someMap.entrySet().stream()
|
|
.sorted(Comparator.comparingInt(Entry::getKey))
|
|
.<error descr="Incompatible types. Found: 'java.util.HashMap<java.lang.Integer,java.lang.Integer>', required: 'java.lang.Throwable'">collect</error>(Collectors.toMap(Entry::getKey, Entry::getValue, (k1, k2) -> k1, HashMap::new)));
|
|
}
|
|
|
|
void use(Throwable t) {}
|
|
} |