mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
java highlighting: provide better incompatible types message on failed inference
GitOrigin-RevId: 5f97ec808f753d9ca40c417704ec93a802512745
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6a7856d5c6
commit
afa0706bfc
+1
-5
@@ -22,11 +22,7 @@ abstract class FooBar<M> {
|
||||
}
|
||||
class Test {
|
||||
<T> List<List<Object>> foo(List<T> objects, Function<T, ?>... functions) {
|
||||
return <error descr="Incompatible types. Required List<List<Object>> but 'collect' was inferred to R:
|
||||
no instance(s) of type variable(s) exist so that List<capture of ?> conforms to List<Object>
|
||||
inference variable T has incompatible bounds:
|
||||
equality constraints: List<Object>
|
||||
lower bounds: List<capture of ?>">objects.stream()
|
||||
return <error descr="Incompatible types. Found: 'java.util.List<java.util.List<capture<?>>>', required: 'java.util.List<java.util.List<java.lang.Object>>'">objects.stream()
|
||||
.map(object -> Arrays.stream(functions)
|
||||
.map(fn -> fn.apply(object))
|
||||
.collect(toList()))
|
||||
|
||||
Reference in New Issue
Block a user