I am having this function defined in a kotlin file
fun loadSubmissions(projectId: Long?, completion: (List<Submission>, Exception) -> Unit) { ... }
And want to call it from Java like this
loadSubmissions(project.getProjectId(), (submissions, e) ->
{
updateSubmissions(submissions);
return null;
});
with
void updateSubmissions(List<Submission> submissionList)
{ .. }
But it gives me
Error:(226, 35) error: incompatible types: List<CAP#1> cannot be
converted to List<Submission>
where CAP#1 is a fresh type-variable:
CAP#1 extends Submission from capture of ? extends Submission
As I realize the parameter of the lambda function seems to be List<CAP#> instead of the expected and defined List<Submission>
If i convert the class to java, i can easily call that function with the lambda callback.
What am I doing wrong