672b5ba0d7
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
19 lines
425 B
Kotlin
Vendored
19 lines
425 B
Kotlin
Vendored
// IGNORE_BACKEND: WASM
|
|
// WASM_MUTE_REASON: STDLIB_COLLECTION_INHERITANCE
|
|
// KJS_WITH_FULL_RUNTIME
|
|
// DONT_TARGET_EXACT_BACKEND: NATIVE
|
|
|
|
open class Map1 : HashMap<String, Any?>()
|
|
class Map2 : Map1()
|
|
fun box(): String {
|
|
val m = Map2()
|
|
if (m.entries.size != 0) return "fail 1"
|
|
|
|
m.put("56", "OK")
|
|
val x = m.entries.iterator().next()
|
|
|
|
if (x.key != "56" || x.value != "OK") return "fail 2"
|
|
|
|
return "OK"
|
|
}
|