[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 {
|
private fun createSimpleKType(type: IrSimpleType): IrExpression {
|
||||||
val classifier: IrClassifierSymbol = type.classifier
|
val classifier: IrClassifierSymbol = type.classifier
|
||||||
|
|
||||||
if (classifier is IrTypeParameterSymbol && classifier.owner.isReified) {
|
// TODO: Check why do we have un-substituted reified parameters
|
||||||
error("Fail")
|
// if (classifier is IrTypeParameterSymbol && classifier.owner.isReified) {
|
||||||
}
|
// error("Fail")
|
||||||
|
// }
|
||||||
|
|
||||||
val kClassifier = createKClassifier(classifier)
|
val kClassifier = createKClassifier(classifier)
|
||||||
// TODO: Use static array types
|
// 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.IN_VARIANCE -> JsIrBuilder.buildString(context.irBuiltIns.stringType, "in")
|
||||||
Variance.OUT_VARIANCE -> JsIrBuilder.buildString(context.irBuiltIns.stringType, "out")
|
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(
|
return buildCall(
|
||||||
context.intrinsics.createKTypeParameter!!,
|
context.intrinsics.createKTypeParameter!!,
|
||||||
|
|||||||
Reference in New Issue
Block a user