KT-53846 LT: Copy context receivers to secondary constructors
This commit is contained in:
committed by
Space Team
parent
873d9b565a
commit
752ba433cc
+1
@@ -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)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_K2: JS_IR
|
||||
// IGNORE_BACKEND_K2_LIGHT_TREE: JVM_IR
|
||||
// Reason: KT-56508
|
||||
// WITH_STDLIB
|
||||
|
||||
class A(val ok: String)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// IGNORE_BACKEND_K2_LIGHT_TREE: JVM_IR
|
||||
// Reason: KT-53846
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
|
||||
Reference in New Issue
Block a user