Why is this working
val foo: kotlin.collections.List<String> = java.util.ArrayList()
The ArrayList is not inheriting the Kotlin List, is it?
That's because kotlin.collections.List, among other types, is a mapped type: during compilation for the JVM, its usages are compiled into the corresponding usages of the Java java.util.List interface.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With