mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 12:31:26 +07:00
MethodReturnTypeFix: highlight only return statements when method return type doesn't match expected (IDEA-216275)
GitOrigin-RevId: d5f7dc3b03d68d249ba29532b0e8c0555cae60d6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ba328fd25a
commit
642c65dd11
@@ -6,7 +6,7 @@ class Test {
|
||||
return list.stream().flatMap(List::stream).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private static List<Object> <error descr="Invalid return type">test1</error>(List<List> list) {
|
||||
private static List<Object> test1(List<List> list) {
|
||||
<error descr="Incompatible types. Found: 'java.lang.Object', required: 'java.util.List<java.lang.Object>'">return list.stream().flatMap(l -> l.stream()).collect(Collectors.toList());</error>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class ConcurrentCollectors {
|
||||
}
|
||||
|
||||
static class Test3 {
|
||||
static <T, K, D, M1 extends Map<K, D>> C<T, M1> <error descr="Invalid return type">groupingBy</error>(F<M1> f,
|
||||
static <T, K, D, M1 extends Map<K, D>> C<T, M1> groupingBy(F<M1> f,
|
||||
C<T, D> c,
|
||||
BiConsumer<M1, T> consumer) {
|
||||
return new CImpl<error descr="Cannot infer arguments"><></error>(f, consumer, arg(c.getOp()));
|
||||
|
||||
Reference in New Issue
Block a user