https://kotlinlang.org logo
Title
t

tipsy

03/30/2019, 1:37 AM
what is the kotlin equivalent of
Map<Class, Object>
? intellij suggests both
Map<Class<Any>, Any>
and
Map<Class<*>, Any>
as parameter type, but neither work when calling the method from java
i guess adding
<?>
to the java version is the answer 🤔 `
d

diesieben07

03/30/2019, 1:11 PM
Yes,
Class
is a legacy raw type and should not be used in Java. Kotlin does not support them.
a

Alexey Belkov [JB]

04/01/2019, 9:17 AM
See https://youtrack.jetbrains.com/issue/KT-30363#focus=streamItem-27-3344960.0-0 for examples of
Map
interop with Java and a little explanation.