diff --git a/core/src/main/java/org/teavm/model/util/MissingItemsProcessor.java b/core/src/main/java/org/teavm/model/util/MissingItemsProcessor.java index 0c3a1d691..2d6840b8b 100644 --- a/core/src/main/java/org/teavm/model/util/MissingItemsProcessor.java +++ b/core/src/main/java/org/teavm/model/util/MissingItemsProcessor.java @@ -56,7 +56,10 @@ public class MissingItemsProcessor { public void processClass(ClassHolder cls) { for (MethodHolder method : cls.getMethods()) { if (reachableMethods.contains(method.getReference()) && method.getProgram() != null) { - processMethod(method); + MethodDependencyInfo methodDep = dependencyInfo.getMethod(method.getReference()); + if (methodDep != null && methodDep.isUsed()) { + processMethod(method); + } } } }