From be259f1667e745bdfc822ed8fefb6016ee13e2ef Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 19 May 2022 10:25:21 +0300 Subject: [PATCH] Fix false negatives when checking missing methods --- .../java/org/teavm/model/util/MissingItemsProcessor.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); + } } } }