Closed Doomsdayrs closed 2 months ago
I'm not familiar with Kotlin, so I don't know where to start. Anyway, without further log, the complete stacktrace or even better a working example project, I'm really unable to help.
I'm not familiar with Kotlin, so I don't know where to start. Anyway, without further log, the complete stacktrace or even better a working example project, I'm really unable to help.
I'll be able to provide better details shortly~
I think the issue is with the Map
definition. When Kotlin code is compiled into Java, Map
is assumed to be read-only, so its type parameters are converted into the Java equivalent of Map<K, ? extends V>
. So, in this case, the type of the value becomes ? extends org.freedesktop.dbus.types.Variant<?>
, which the method recursiveGetDBusType
cannot handle properly.
As a workaround, you can use MutableMap
instead.
I have the following class produced by the auto generator, then converted to Kotlin
Then I have the same class, but in original java.
Utilizing the classes, we get the following results
What is going on here?