Don't capture primary constructor variables

This commit is contained in:
Mikhael Bogdanov
2018-01-10 17:05:44 +01:00
parent 28f4cc5b18
commit ca22bc57fd
@@ -124,6 +124,10 @@ class ClosureAnnotator {
includeInParent(closureBuilder) includeInParent(closureBuilder)
} }
classDescriptor.unsubstitutedPrimaryConstructor?.valueParameters?.forEach {
closureBuilder.declareVariable(it)
}
closuresStack.push(closureBuilder) closuresStack.push(closureBuilder)
declaration.acceptChildrenVoid(this) declaration.acceptChildrenVoid(this)
closuresStack.pop() closuresStack.pop()