From 92a07254c76310f1a2c8403d6cd329ca3839fab2 Mon Sep 17 00:00:00 2001 From: Pavel Marek Date: Thu, 21 Nov 2024 11:56:46 +0100 Subject: [PATCH] Remove unnecessary isntancdeof --- .../enso/compiler/pass/analyse/AmbiguousImportsAnalysis.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/runtime-compiler/src/main/java/org/enso/compiler/pass/analyse/AmbiguousImportsAnalysis.java b/engine/runtime-compiler/src/main/java/org/enso/compiler/pass/analyse/AmbiguousImportsAnalysis.java index bfbe7aabd1..1bbbdd054a 100644 --- a/engine/runtime-compiler/src/main/java/org/enso/compiler/pass/analyse/AmbiguousImportsAnalysis.java +++ b/engine/runtime-compiler/src/main/java/org/enso/compiler/pass/analyse/AmbiguousImportsAnalysis.java @@ -102,8 +102,8 @@ public final class AmbiguousImportsAnalysis implements MiniPassFactory { public Module transformModule(Module moduleIr) { var newImports = new ArrayList(); moduleIr.imports().foreach(imp -> { - if (imp instanceof Import.Module impMod) { - var errs = analyseAmbiguousSymbols(impMod); + var errs = analyseAmbiguousSymbols(imp); + if (!errs.isEmpty()) { newImports.addAll(errs); } else { newImports.add(imp);