d4b0688690
Before this commit we initialized delegate fields in primary constructor, that could provoke NPE in case delegate is used in initializer of some property backing field. Now we initialize delegate fields directly instead.
70 lines
1.6 KiB
Plaintext
Vendored
70 lines
1.6 KiB
Plaintext
Vendored
open class ControlFlowInfo<K : Any?, V : Any?> : Map<K, V> {
|
|
constructor(map: Map<K, V>) /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
override fun containsKey(key: K): Boolean {
|
|
return <this>.#<$$delegate_0>.containsKey(key = key)
|
|
}
|
|
|
|
override fun containsValue(value: V): Boolean {
|
|
return <this>.#<$$delegate_0>.containsValue(value = value)
|
|
}
|
|
|
|
override operator fun get(key: K): V? {
|
|
return <this>.#<$$delegate_0>.get(key = key)
|
|
}
|
|
|
|
@SinceKotlin(version = "1.1")
|
|
@PlatformDependent
|
|
override fun getOrDefault(key: K, defaultValue: V): V {
|
|
return <this>.#<$$delegate_0>.getOrDefault(key = key, defaultValue = defaultValue)
|
|
}
|
|
|
|
override fun isEmpty(): Boolean {
|
|
return <this>.#<$$delegate_0>.isEmpty()
|
|
}
|
|
|
|
override val entries: Set<Entry<K, V>>
|
|
override get(): Set<Entry<K, V>> {
|
|
return <this>.#<$$delegate_0>.<get-entries>()
|
|
}
|
|
|
|
override val keys: Set<K>
|
|
override get(): Set<K> {
|
|
return <this>.#<$$delegate_0>.<get-keys>()
|
|
}
|
|
|
|
override val size: Int
|
|
override get(): Int {
|
|
return <this>.#<$$delegate_0>.<get-size>()
|
|
}
|
|
|
|
override val values: Collection<V>
|
|
override get(): Collection<V> {
|
|
return <this>.#<$$delegate_0>.<get-values>()
|
|
}
|
|
|
|
local /* final field */ val <$$delegate_0>: Map<K, V> = map
|
|
val map: Map<K, V>
|
|
field = map
|
|
get
|
|
|
|
}
|
|
|
|
class StringFlowInfo : ControlFlowInfo<String, String> {
|
|
constructor(map: Map<String, String>) /* primary */ {
|
|
super/*ControlFlowInfo*/<String, String>(map = map)
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
fun foo(info: StringFlowInfo) {
|
|
<this>.<get-keys>() /*~> Unit */
|
|
info.<get-keys>() /*~> Unit */
|
|
}
|
|
|
|
}
|