mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Add MutableMap.remove(K, V) as built-in declaration
Use PlatformDependent annotation to guarantee it's only be available for JDK8 Also adjust type-safe bridges and mutable collection stubs generation
This commit is contained in:
25
compiler/testData/codegen/java8/writeSignature/mutableMapRemove.kt
vendored
Normal file
25
compiler/testData/codegen/java8/writeSignature/mutableMapRemove.kt
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
class KotlinMap1<K, V> : java.util.AbstractMap<K, V>() {
|
||||
override val entries: MutableSet<MutableMap.MutableEntry<K, V>>
|
||||
get() = throw UnsupportedOperationException()
|
||||
|
||||
override fun remove(x: K, y: V) = true
|
||||
}
|
||||
|
||||
// method: KotlinMap1::remove
|
||||
// jvm signature: (Ljava/lang/Object;Ljava/lang/Object;)Z
|
||||
// generic signature: null
|
||||
|
||||
class KotlinMap2 : java.util.AbstractMap<String, Int>() {
|
||||
override val entries: MutableSet<MutableMap.MutableEntry<String, Int>>
|
||||
get() = throw UnsupportedOperationException()
|
||||
|
||||
override fun remove(x: String, y: Int) = true
|
||||
}
|
||||
|
||||
// method: KotlinMap2::remove
|
||||
// jvm signature: (Ljava/lang/Object;Ljava/lang/Object;)Z
|
||||
// generic signature: null
|
||||
|
||||
// method: KotlinMap2::remove
|
||||
// jvm signature: (Ljava/lang/String;Ljava/lang/Integer;)Z
|
||||
// generic signature: null
|
||||
Reference in New Issue
Block a user