[K/N] don't rely on expression type when lowering value constructor calls
Because of generics, these types don't exactly match the actual types in generated code, and autoboxing can't fix this because this happens after it. ^KT-48381 Fixed
This commit is contained in:
committed by
Space
parent
aaf666e0e1
commit
01272cace3
+1
-1
@@ -457,7 +457,7 @@ private class InlineClassTransformer(private val context: Context) : IrBuildingT
|
||||
this.at(expression)
|
||||
val loweredConstructor = this@InlineClassTransformer.context.getLoweredInlineClassConstructor(callee)
|
||||
return if (callee.isPrimary) this.irBlock {
|
||||
val argument = irTemporary(expression.getValueArgument(0)!!)
|
||||
val argument = irTemporary(expression.getValueArgument(0)!!, irType = loweredConstructor.valueParameters.single().type)
|
||||
+irCall(loweredConstructor).apply {
|
||||
putValueArgument(0, irGet(argument))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user