FIR: reproduce KT-43569
This commit is contained in:
committed by
Dmitriy Novozhilov
parent
0d8cdb7bdb
commit
7ea58adc50
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user