[IR] Add isAssignable property to IrValueParameter.

Use it to check that only the value parameters that are explicitly
marked assignable are assigned.

Currently, the only parameters marked assignable are those for
default argument stubs.
This commit is contained in:
Mads Ager
2020-09-15 13:42:42 +02:00
committed by Alexander Udalov
parent 8d791ca98e
commit 1f2ca606a5
26 changed files with 55 additions and 34 deletions
@@ -379,7 +379,7 @@ interface IrBuilderExtension {
fun irValueParameter(descriptor: ParameterDescriptor): IrValueParameter = with(descriptor) {
factory.createValueParameter(
function.startOffset, function.endOffset, SERIALIZABLE_PLUGIN_ORIGIN, IrValueParameterSymbolImpl(this),
name, indexOrMinusOne, type.toIrType(), varargElementType?.toIrType(), isCrossinline, isNoinline
name, indexOrMinusOne, type.toIrType(), varargElementType?.toIrType(), isCrossinline, isNoinline, false
).also {
it.parent = function
}