Files
kotlin-fork/js/js.translator/testData/box/standardClasses/mutableMapRemoveWithCollision.kt
T
Alexey Andreev 3b3fd0fa0d JS: fix DCE limits in test data to fit new kotlin.js size
The size has increased due to new implementation of KClass
2017-10-06 18:16:51 +03:00

23 lines
347 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1117
package foo
class A {
override fun hashCode() = 23456
}
fun box(): String {
val x = A()
val y = A()
val map = mutableMapOf<A, Int>()
map[x] = 1
assertEquals(1, map.size)
map.remove(y)
assertEquals(1, map.size)
map.remove(x)
assertEquals(0, map.size)
return "OK"
}