40 lines
981 B
Kotlin
Vendored
40 lines
981 B
Kotlin
Vendored
abstract class A<T : Any?> : SortedMap<T, T>, Map<T, T> {
|
|
constructor() /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
abstract class B<T : Any?> : SortedMap<T, T>, Map<T, T> {
|
|
constructor() /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
override fun put(key: T, value: T): T {
|
|
return CHECK_NOT_NULL<Nothing>(arg0 = null)
|
|
}
|
|
|
|
override fun remove(key: T): T {
|
|
return CHECK_NOT_NULL<Nothing>(arg0 = null)
|
|
}
|
|
|
|
}
|
|
|
|
fun test(a: A<Boolean>, b: B<Boolean?>) {
|
|
a.<get-size>() /*~> Unit */
|
|
a.set<@FlexibleNullability Boolean?, @FlexibleNullability Boolean?>(key = true, value = true)
|
|
a.put(key = null, value = null) /*~> Unit */
|
|
a.get(key = true) /*~> Unit */
|
|
a.get(key = null) /*~> Unit */
|
|
a.remove(key = null) /*~> Unit */
|
|
a.remove(key = true) /*~> Unit */
|
|
b.<get-size>() /*~> Unit */
|
|
b.put(key = false, value = false) /*~> Unit */
|
|
b.set<Boolean?, Boolean?>(key = true, value = true)
|
|
b.remove(key = null) /*~> Unit */
|
|
}
|