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:
+4
@@ -189,6 +189,10 @@ class ClosureAnnotator(irFile: IrFile) {
|
||||
|
||||
private fun processMemberAccess(declaration: IrDeclaration) {
|
||||
if (declaration.isLocal) {
|
||||
if (declaration is IrSimpleFunction && declaration.parent is IrClass) {
|
||||
return
|
||||
}
|
||||
|
||||
val builder = closureBuilders[declaration]
|
||||
builder?.let {
|
||||
closuresStack.peek()?.include(builder)
|
||||
|
||||
Reference in New Issue
Block a user