mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 15:51:01 +00:00
Backend: If kotlin class extends kotlin.collection.List
write it as it's super interface (light class mode only)
IDE: Provide wrapper classes to java resolve
that try to emulate backend behaviour
For example if kotlin class implements kotlin.collections.Map,
we provide a superinterface that has abstract 'getEntries' method
and 'entrySet' method that is considered default.
In reality all those methods are generated in the class itself.
In IDE supporting this case without hacks is not feasible performance-wise
since kotlin.collection.* may not be an immediate supertype and we need
to compute all supertypes just to calculate own methods of the class
8 lines
186 B
Kotlin
Vendored
8 lines
186 B
Kotlin
Vendored
// p1.TypeHierarchyMap
|
|
package p1
|
|
|
|
class TypeHierarchyMap<TValue> : Map<Class<*>, TValue> {
|
|
override fun containsKey(key: Class<*>): Boolean {
|
|
TODO("not implemented")
|
|
}
|
|
} |