JS: remove unconditional as SimpleType cast

This is a workround for a bug introduced in the typeOf
support
This commit is contained in:
Anton Bannykh
2019-09-26 17:51:38 +03:00
parent 82f75c707e
commit b4917ec816
@@ -129,7 +129,9 @@ fun <T, S> List<T>.splitToRanges(classifier: (T) -> S): List<Pair<List<T>, S>> {
fun getReferenceToJsClass(type: KotlinType, context: TranslationContext): JsExpression =
getReferenceToJsClass(type.constructor.declarationDescriptor, context).also {
it.kType = KTypeConstructor(context).createKType(type as SimpleType)
if (type is SimpleType) {
it.kType = KTypeConstructor(context).createKType(type)
}
}
fun getReferenceToJsClass(classifierDescriptor: ClassifierDescriptor?, context: TranslationContext): JsExpression {