[IR] Mark IrValueParameterImpl with an opt-in annotation

KT-59318
This commit is contained in:
Sergej Jaskiewicz
2023-12-07 19:08:46 +01:00
committed by Space Team
parent b56a04e796
commit f482b6a458
9 changed files with 110 additions and 87 deletions
@@ -426,14 +426,24 @@ private class ScriptsToClassesLowering(val context: JvmBackendContext, val inner
add(it)
++parametersIndex
}
addAll(irScript.explicitCallParameters.map {
IrValueParameterImpl(
it.startOffset, it.endOffset,
IrDeclarationOrigin.SCRIPT_CALL_PARAMETER, IrValueParameterSymbolImpl(),
it.name, index = parametersIndex++, type = it.type,
varargElementType = null, isCrossinline = false, isNoinline = false, isHidden = false, isAssignable = false
).also { it.parent = irScript }
})
addAll(
irScript.explicitCallParameters.map {
context.irFactory.createValueParameter(
startOffset = it.startOffset,
endOffset = it.endOffset,
origin = IrDeclarationOrigin.SCRIPT_CALL_PARAMETER,
name = it.name,
type = it.type,
isAssignable = false,
symbol = IrValueParameterSymbolImpl(),
index = parametersIndex++,
varargElementType = null,
isCrossinline = false,
isNoinline = false,
isHidden = false,
).also { it.parent = irScript }
},
)
implicitReceiversFieldsWithParameters.forEach {(_, param) ->
add(param)
}