KT-53846 LT: Copy context receivers to secondary constructors

This commit is contained in:
Pavel Mikhailovskii
2023-02-20 18:13:54 +00:00
committed by Space Team
parent 873d9b565a
commit 752ba433cc
3 changed files with 1 additions and 4 deletions
@@ -1051,6 +1051,7 @@ class DeclarationsConverter(
val (body, _) = convertFunctionBody(block, null, allowLegacyContractDescription = true)
this.body = body
context.firFunctionTargets.removeLast()
this.contextReceivers.addAll(convertContextReceivers(secondaryConstructor.getParent()!!.getParent()!!))
}.also {
it.containingClassForStaticMemberAttr = currentDispatchReceiverType()!!.lookupTag
target.bind(it)