[Wasm] Disable interop adapters for WasmImport
Merge-request: KT-MR-8152
This commit is contained in:
committed by
Space Team
parent
34a49b3f56
commit
9d099348ba
+2
@@ -14,6 +14,7 @@ import org.jetbrains.kotlin.backend.wasm.WasmBackendContext
|
||||
import org.jetbrains.kotlin.backend.wasm.ir2wasm.isBuiltInWasmRefType
|
||||
import org.jetbrains.kotlin.backend.wasm.ir2wasm.isExported
|
||||
import org.jetbrains.kotlin.backend.wasm.ir2wasm.isExternalType
|
||||
import org.jetbrains.kotlin.backend.wasm.utils.getWasmImportDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.DescriptorVisibilities
|
||||
import org.jetbrains.kotlin.ir.backend.js.utils.getJsNameOrKotlinName
|
||||
import org.jetbrains.kotlin.ir.builders.*
|
||||
@@ -49,6 +50,7 @@ class JsInteropFunctionsLowering(val context: WasmBackendContext) : DeclarationT
|
||||
if (declaration.isPropertyAccessor) return null
|
||||
if (declaration.parent !is IrPackageFragment) return null
|
||||
if (!isExported && !isExternal) return null
|
||||
if (declaration.getWasmImportDescriptor() != null) return null
|
||||
check(!(isExported && isExternal)) { "Exported external declarations are not supported: ${declaration.fqNameWhenAvailable}" }
|
||||
check(declaration.parent !is IrClass) { "Interop members are not supported: ${declaration.fqNameWhenAvailable}" }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user