[JS IR] Remove unused CALLABLE_CLOSURE_DECLARATION declaration origin
This commit is contained in:
@@ -147,8 +147,6 @@ class JsIrBackendContext(
|
||||
// TODO: due to name clash those weird suffix is required, remove it once `MemberNameGenerator` is implemented
|
||||
private val COROUTINE_SUSPEND_OR_RETURN_JS_NAME = "suspendCoroutineUninterceptedOrReturnJS"
|
||||
private val GET_COROUTINE_CONTEXT_NAME = "getCoroutineContext"
|
||||
|
||||
val callableClosureOrigin = object : IrDeclarationOriginImpl("CALLABLE_CLOSURE_DECLARATION") {}
|
||||
}
|
||||
|
||||
private val internalPackage = module.getPackage(JS_PACKAGE_FQNAME)
|
||||
|
||||
+2
-4
@@ -27,10 +27,8 @@ import org.jetbrains.kotlin.js.backend.ast.*
|
||||
@Suppress("PARAMETER_NAME_CHANGED_ON_OVERRIDE")
|
||||
class IrElementToJsStatementTransformer : BaseIrElementToJsNodeTransformer<JsStatement, JsGenerationContext> {
|
||||
|
||||
override fun visitFunction(declaration: IrFunction, data: JsGenerationContext) = JsEmpty.also {
|
||||
assert(declaration.origin == JsIrBackendContext.callableClosureOrigin) {
|
||||
"The only possible Function Declaration is one composed in Callable Reference Lowering"
|
||||
}
|
||||
override fun visitFunction(declaration: IrFunction, data: JsGenerationContext): JsStatement {
|
||||
error("All functions must be already lowered")
|
||||
}
|
||||
|
||||
override fun visitBlockBody(body: IrBlockBody, context: JsGenerationContext): JsStatement {
|
||||
|
||||
Reference in New Issue
Block a user