mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-18 08:31:38 +00:00
Move collectionStubMethodLowering before jvmInlineClassPhase, and make them interact properly. Note that some issues still remain in inline class <-> special bridges interaction. KT-40187 KT-42469
17 lines
621 B
Kotlin
Vendored
17 lines
621 B
Kotlin
Vendored
// IGNORE_ANNOTATIONS
|
|
|
|
inline class IK(val x: Int)
|
|
inline class IV(val x: Double)
|
|
|
|
inline class InlineMap(private val map: Map<IK, IV>) : Map<IK, IV> {
|
|
override val entries: Set<Map.Entry<IK, IV>> get() = map.entries
|
|
override val keys: Set<IK> get() = map.keys
|
|
override val size: Int get() = map.size
|
|
override val values: Collection<IV> get() = map.values
|
|
override fun containsKey(key: IK): Boolean = map.containsKey(key)
|
|
override fun containsValue(value: IV): Boolean = map.containsValue(value)
|
|
override fun get(key: IK): IV? = map[key]
|
|
override fun isEmpty(): Boolean = map.isEmpty()
|
|
}
|
|
|