[K/Wasm] Fix object optimization false trigger on non-pure objects ^KT-66471 Fixed
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// KT-66471
|
||||
|
||||
interface TestInterface {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
var result: Any? = "Fail: not initialized"
|
||||
|
||||
object TestObject {
|
||||
private val test = run {
|
||||
result = TestInterface::foo
|
||||
"OK"
|
||||
}
|
||||
|
||||
fun bar() {}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
TestObject.bar()
|
||||
return if (result is Function<*>) "OK" else result.toString()
|
||||
}
|
||||
Reference in New Issue
Block a user