FIR: reproduce KT-43569

This commit is contained in:
Jinseong Jeon
2020-11-25 10:24:21 -08:00
committed by Dmitriy Novozhilov
parent 0d8cdb7bdb
commit 7ea58adc50
7 changed files with 261 additions and 0 deletions
@@ -0,0 +1,32 @@
class Flaf {
constructor(javaName: String) /* primary */ {
super/*Any*/()
/* <init>() */
}
val javaName: String
field = javaName
get
private val INSTANCES: MutableMap<String, Flaf>
field = mutableMapOf<String, Flaf>()
private get
fun forJavaName(javaName: String): Flaf {
var result: Flaf? = <this>.<get-INSTANCES>().get(key = javaName)
when {
EQEQ(arg0 = result, arg1 = null) -> { // BLOCK
result = <this>.<get-INSTANCES>().get(key = javaName + "_alternative")
when {
EQEQ(arg0 = result, arg1 = null) -> { // BLOCK
result = Flaf(javaName = javaName)
}
}
<this>.<get-INSTANCES>().set<String, Flaf>(key = javaName, value = result)
}
}
return result
}
}