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,20 @@
// WITH_RUNTIME
// FULL_JDK
class Flaf(val javaName: String) {
private val INSTANCES = mutableMapOf<String, Flaf>()
fun forJavaName(javaName: String): Flaf {
var result: Flaf? = INSTANCES[javaName]
if (result == null) {
result = INSTANCES["${javaName}_alternative"]
if (result == null) {
result = Flaf(javaName)
}
INSTANCES[javaName] = result
}
return result
}
}