IR: Do not capture variables from method calls in ClosureAnnotator
To call a method of a class, you never need to supply any values of local variables (they would always be provided to the constructor).
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
class C {
|
||||
|
||||
val s = "OK"
|
||||
|
||||
private val localObject = object {
|
||||
fun getS(): String {
|
||||
return s
|
||||
}
|
||||
}
|
||||
|
||||
fun ok(): String =
|
||||
33.let { localObject.getS() }
|
||||
}
|
||||
|
||||
fun box() = C().ok()
|
||||
Reference in New Issue
Block a user