mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 18:50:54 +07:00
MethodReturnTypeFix: updated fix to change method return type based on return statements in method body (IDEA-216275)
GitOrigin-RevId: e97990950039123c8c41921a71342b8ed60afdee
This commit is contained in:
committed by
intellij-monorepo-bot
parent
52aa1ae553
commit
42d733a694
@@ -6,7 +6,7 @@ class Test {
|
||||
return list.stream().flatMap(List::stream).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private static List<Object> test1(List<List> list) {
|
||||
private static List<Object> <error descr="Invalid return type">test1</error>(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> groupingBy(F<M1> f,
|
||||
static <T, K, D, M1 extends Map<K, D>> C<T, M1> <error descr="Invalid return type">groupingBy</error>(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