[JS IR] Fix unsgined integer default arguemtns (KT-44180)
Const lowering didn't exprect null constants with unsigned number types and crashed with NPE. This commit fixes that.
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@ class ConstTransformer(private val context: JsIrBackendContext) : IrElementTrans
|
||||
|
||||
override fun <T> visitConst(expression: IrConst<T>): IrExpression {
|
||||
with(context.intrinsics) {
|
||||
if (expression.type.isUnsigned()) {
|
||||
if (expression.type.isUnsigned() && expression.kind != IrConstKind.Null) {
|
||||
return when (expression.type.classifierOrNull) {
|
||||
uByteClassSymbol -> lowerConst(uByteClassSymbol, IrConstImpl.Companion::byte, IrConstKind.Byte.valueOf(expression))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user