Temporary set public constructor visibility for lowered local declarations
Allow to support callable reference in next commits
This commit is contained in:
+7
-2
@@ -40,7 +40,12 @@ interface LocalNameProvider {
|
||||
}
|
||||
}
|
||||
|
||||
class LocalDeclarationsLowering(val context: BackendContext, val localNameProvider: LocalNameProvider = LocalNameProvider.DEFAULT) : DeclarationContainerLoweringPass {
|
||||
class LocalDeclarationsLowering(
|
||||
val context: BackendContext,
|
||||
val localNameProvider: LocalNameProvider = LocalNameProvider.DEFAULT,
|
||||
val loweredConstructorVisibility: Visibility = Visibilities.PRIVATE
|
||||
) :
|
||||
DeclarationContainerLoweringPass {
|
||||
|
||||
private object DECLARATION_ORIGIN_FIELD_FOR_CAPTURED_VALUE :
|
||||
IrDeclarationOriginImpl("FIELD_FOR_CAPTURED_VALUE") {}
|
||||
@@ -626,7 +631,7 @@ class LocalDeclarationsLowering(val context: BackendContext, val localNameProvid
|
||||
|
||||
newDescriptor.initialize(
|
||||
newValueParameters.map { it.descriptor as ValueParameterDescriptor },
|
||||
Visibilities.PRIVATE,
|
||||
loweredConstructorVisibility,
|
||||
newTypeParameters
|
||||
)
|
||||
newDescriptor.returnType = oldDescriptor.returnType
|
||||
|
||||
Reference in New Issue
Block a user