backend: Fix lowering of default arguments to local functions
Fix: external_codegen_blackbox_functions_localFunctions/kt3978.kt external_codegen_blackbox_closures/kt5589.kt
This commit is contained in:
+6
-1
@@ -170,7 +170,12 @@ class LocalDeclarationsLowering(val context: BackendContext) : DeclarationContai
|
||||
original.startOffset, original.endOffset, original.origin,
|
||||
it.transformedDescriptor,
|
||||
original.body
|
||||
)
|
||||
).apply {
|
||||
original.descriptor.valueParameters.filter { it.declaresDefaultValue() }.forEach { argument ->
|
||||
val body = original.getDefault(argument)!!
|
||||
this.putDefault(oldParameterToNew[argument] as ValueParameterDescriptor, body)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
localClasses.values.mapTo(this) {
|
||||
|
||||
Reference in New Issue
Block a user