[IR] Replaced K/N findPackage with common getPackageFragment

This commit is contained in:
Igor Chevdar
2022-04-17 20:18:32 +05:00
committed by Space
parent 78b23eea10
commit 04ef856780
18 changed files with 29 additions and 39 deletions
@@ -95,7 +95,6 @@ class WasmCompiledModuleFragment(val irBuiltIns: IrBuiltIns) {
val declaration = (ir as? IrSymbol)?.owner as? IrDeclarationWithName
if (declaration != null) {
val packageFragment = declaration.getPackageFragment()
?: error("Referencing declaration without package fragment ${declaration.fqNameWhenAvailable}")
if (packageFragment is IrExternalPackageFragment) {
error("Referencing declaration without package fragment ${declaration.fqNameWhenAvailable}")
}