audax
08/05/2025, 7:37 AM@JvmStatic
fun exampleFunction(
foo: String,
bar: List<String>,
): List<String> = bar.map { "$foo-$it" }
Called in Java:
List<String> foo = List.of("foo", "bar");
DebugKt.exampleFunction("baz", foo);
Results in the following IDE Errors:
'exampleFunction(java.lang.@org.jetbrains.annotations.NotNull String, java.util.@org.jetbrains.annotations.NotNull List<java.lang.@org.jetbrains.annotations.NotNull String>)' in 'com.example.DebugKt' cannot be applied to '(java.lang.String, java.util.List<java.lang.String>)'
Any idea on how to work around this issue? All the issues I've found look pretty stale. Our current workaround is to disable the K2 plugin whenever we work in the backend because the legacy plugin doesn't have this bug.