IR: correct type for a null const argument

This commit is contained in:
Georgy Bronnikov
2019-08-14 14:33:44 +03:00
parent e915bc2a69
commit 20351b7c1b
@@ -363,7 +363,7 @@ open class DefaultParameterInjector(
if (expression.symbol is IrConstructorSymbol) {
val defaultArgumentMarker = context.ir.symbols.defaultConstructorMarker
params += markerParameterDeclaration(realFunction) to
IrConstImpl.constNull(startOffset, endOffset, defaultArgumentMarker.owner.defaultType)
IrConstImpl.constNull(startOffset, endOffset, context.irBuiltIns.nothingNType)
} else if (context.ir.shouldGenerateHandlerParameterForDefaultBodyFun()) {
params += realFunction.valueParameters.last() to
IrConstImpl.constNull(startOffset, endOffset, context.irBuiltIns.nothingNType)