[JS IR BE] Don't fail typeOf lowering on reified type parameters.
This commit is contained in:
+9
-6
@@ -151,9 +151,10 @@ class ClassReferenceLowering(val context: JsIrBackendContext) : BodyLoweringPass
|
||||
private fun createSimpleKType(type: IrSimpleType): IrExpression {
|
||||
val classifier: IrClassifierSymbol = type.classifier
|
||||
|
||||
if (classifier is IrTypeParameterSymbol && classifier.owner.isReified) {
|
||||
error("Fail")
|
||||
}
|
||||
// TODO: Check why do we have un-substituted reified parameters
|
||||
// if (classifier is IrTypeParameterSymbol && classifier.owner.isReified) {
|
||||
// error("Fail")
|
||||
// }
|
||||
|
||||
val kClassifier = createKClassifier(classifier)
|
||||
// TODO: Use static array types
|
||||
@@ -206,9 +207,11 @@ class ClassReferenceLowering(val context: JsIrBackendContext) : BodyLoweringPass
|
||||
Variance.IN_VARIANCE -> JsIrBuilder.buildString(context.irBuiltIns.stringType, "in")
|
||||
Variance.OUT_VARIANCE -> JsIrBuilder.buildString(context.irBuiltIns.stringType, "out")
|
||||
}
|
||||
if (typeParameter.isReified) {
|
||||
error("Reified parameter")
|
||||
}
|
||||
|
||||
// TODO: Check why do we have non-inlined reified parameters
|
||||
// if (typeParameter.isReified) {
|
||||
// error("Reified parameter")
|
||||
// }
|
||||
|
||||
return buildCall(
|
||||
context.intrinsics.createKTypeParameter!!,
|
||||
|
||||
Reference in New Issue
Block a user