Don't recreate ir declarations to set body
This commit is contained in:
+3
-14
@@ -161,20 +161,9 @@ open class DefaultArgumentStubGenerator constructor(val context: CommonBackendCo
|
|||||||
irFunction.valueParameters.forEach {
|
irFunction.valueParameters.forEach {
|
||||||
it.defaultValue = null
|
it.defaultValue = null
|
||||||
}
|
}
|
||||||
return if (functionDescriptor is ClassConstructorDescriptor)
|
|
||||||
listOf(irFunction, IrConstructorImpl(
|
newIrFunction.body = body
|
||||||
startOffset = irFunction.startOffset,
|
return listOf(irFunction, newIrFunction)
|
||||||
endOffset = irFunction.endOffset,
|
|
||||||
descriptor = descriptor as ClassConstructorDescriptor,
|
|
||||||
origin = DECLARATION_ORIGIN_FUNCTION_FOR_DEFAULT_PARAMETER,
|
|
||||||
body = body).apply { createParameterDeclarations() })
|
|
||||||
else
|
|
||||||
listOf(irFunction, IrFunctionImpl(
|
|
||||||
startOffset = irFunction.startOffset,
|
|
||||||
endOffset = irFunction.endOffset,
|
|
||||||
descriptor = descriptor,
|
|
||||||
origin = DECLARATION_ORIGIN_FUNCTION_FOR_DEFAULT_PARAMETER,
|
|
||||||
body = body).apply { createParameterDeclarations() })
|
|
||||||
}
|
}
|
||||||
return listOf(irFunction)
|
return listOf(irFunction)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user