[FIR2IR] Make checks about f/o accessors necessity more precise
#KT-43342 Fixed
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
open class ControlFlowInfo<K : Any?, V : Any?> : Map<K, V> {
|
||||
constructor(map: Map<K, V>) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val map: Map<K, V>
|
||||
field = map
|
||||
get
|
||||
|
||||
override fun containsKey(key: K): Boolean {
|
||||
return <this>.#map.containsKey(key = key)
|
||||
}
|
||||
|
||||
override fun containsValue(value: V): Boolean {
|
||||
return <this>.#map.containsValue(value = value)
|
||||
}
|
||||
|
||||
override operator fun get(key: K): V? {
|
||||
return <this>.#map.get(key = key)
|
||||
}
|
||||
|
||||
override fun isEmpty(): Boolean {
|
||||
return <this>.#map.isEmpty()
|
||||
}
|
||||
|
||||
override val entries: Set<Entry<K, V>>
|
||||
override get(): Set<Entry<K, V>> {
|
||||
return <this>.#map.<get-entries>()
|
||||
}
|
||||
|
||||
override val keys: Set<K>
|
||||
override get(): Set<K> {
|
||||
return <this>.#map.<get-keys>()
|
||||
}
|
||||
|
||||
override val size: Int
|
||||
override get(): Int {
|
||||
return <this>.#map.<get-size>()
|
||||
}
|
||||
|
||||
override val values: Collection<V>
|
||||
override get(): Collection<V> {
|
||||
return <this>.#map.<get-values>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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 */
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user