mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-10 23:30:23 +07:00
Fixes IDEA-362351 An Incorrect Error warning "Non-static methods cannot be referenced from a static context" Fixes IDEA-173183 Wrong error message for method reference Improves IDEA-208532 Incorrect Inspect code error in lambda expression method reference GitOrigin-RevId: 8f7a17688eaa1aba72bbccd45395967656108668
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(<error descr="Incompatible types. Found: 'java.util.HashMap<java.lang.Integer,java.lang.Integer>', required: 'java.lang.Throwable'">someMap.entrySet().stream()
|
|
.sorted(Comparator.comparingInt(Entry::getKey))
|
|
.collect(Collectors.toMap(Entry::getKey, Entry::getValue, (k1, k2) -> k1, HashMap::new))</error>);
|
|
}
|
|
|
|
void use(Throwable t) {}
|
|
} |