[KJS] Throw exception on recursive types provided to typeOf and provide proper support later within KT-40173

#KT-38140 fixed
This commit is contained in:
Zalim Bashorov
2020-07-10 02:45:30 +03:00
parent c552933459
commit 340512e27a
11 changed files with 108 additions and 21 deletions
@@ -196,7 +196,8 @@ class ClassReferenceLowering(val context: JsIrBackendContext) : BodyLoweringPass
}
private fun createKTypeParameter(typeParameter: IrTypeParameter, visitedTypeParams: MutableSet<IrTypeParameter>): IrExpression {
if (typeParameter in visitedTypeParams) return buildCall(context.intrinsics.getStarKTypeProjection!!)
// See KT-40173
if (typeParameter in visitedTypeParams) TODO("Non-reified type parameters with recursive bounds are not supported yet")
visitedTypeParams.add(typeParameter)