Skip expect declaration
This commit is contained in:
+1
@@ -14,6 +14,7 @@ import org.jetbrains.kotlin.js.backend.ast.JsVars
|
||||
class IrDeclarationToJsTransformer : BaseIrElementToJsNodeTransformer<JsStatement, JsGenerationContext> {
|
||||
|
||||
override fun visitSimpleFunction(declaration: IrSimpleFunction, context: JsGenerationContext): JsStatement {
|
||||
if (declaration.descriptor.isExpect) return JsEmpty // TODO: fix it in Psi2Ir
|
||||
return declaration.accept(IrFunctionToJsTransformer(), context).makeStmt()
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -28,6 +28,8 @@ class JsClassGenerator(private val irClass: IrClass, val context: JsGenerationCo
|
||||
|
||||
fun generate(): JsStatement {
|
||||
|
||||
if (irClass.descriptor.isExpect) return JsEmpty // TODO: fix it in Psi2Ir
|
||||
|
||||
maybeGeneratePrimaryConstructor()
|
||||
val transformer = IrDeclarationToJsTransformer()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user