Remove unnecessary isntancdeof

This commit is contained in:
Pavel Marek 2024-11-21 11:56:46 +01:00
parent 5a74cc1e0c
commit 92a07254c7

View File

@ -102,8 +102,8 @@ public final class AmbiguousImportsAnalysis implements MiniPassFactory {
public Module transformModule(Module moduleIr) { public Module transformModule(Module moduleIr) {
var newImports = new ArrayList<Import>(); var newImports = new ArrayList<Import>();
moduleIr.imports().foreach(imp -> { moduleIr.imports().foreach(imp -> {
if (imp instanceof Import.Module impMod) { var errs = analyseAmbiguousSymbols(imp);
var errs = analyseAmbiguousSymbols(impMod); if (!errs.isEmpty()) {
newImports.addAll(errs); newImports.addAll(errs);
} else { } else {
newImports.add(imp); newImports.add(imp);