Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/interfaceDelegation/kt38337Generic.kt
T
Mikhail Glukhikh 672b5ba0d7 K2/Java: implement platform-dependent function filtering in JvmMappedScope
We drop Kotlin function 'remove' or 'getOrDefault' from JvmMappedScope,
if it has platform-dependent annotation, and the bound Java class scope
does not contain a function with the same signature.

#KT-57268 Fixed
2024-01-30 19:44:00 +00:00

15 lines
416 B
Kotlin
Vendored

// WITH_STDLIB
// WORKS_WHEN_VALUE_CLASS
// LANGUAGE: +ValueClasses, +GenericInlineClassParameter
// JVM_ABI_K1_K2_DIFF: KT-63828
OPTIONAL_JVM_INLINE_ANNOTATION
value class Wrapper<T: Int>(val id: T)
class DMap(private val map: Map<Wrapper<Int>, String>) :
Map<Wrapper<Int>, String> by map
fun box(): String {
val dmap = DMap(mutableMapOf(Wrapper(42) to "OK"))
return dmap[Wrapper(42)] ?: "Fail"
}