From 04de57627f5d80e26c8ee65daf12391287a0fa10 Mon Sep 17 00:00:00 2001 From: konsoletyper Date: Sun, 2 Mar 2014 10:05:56 +0400 Subject: [PATCH] Fixes dependency propagation of exceptions --- .../main/java/org/teavm/dependency/DependencyGraphBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teavm-core/src/main/java/org/teavm/dependency/DependencyGraphBuilder.java b/teavm-core/src/main/java/org/teavm/dependency/DependencyGraphBuilder.java index f38638316..6b3de2d65 100644 --- a/teavm-core/src/main/java/org/teavm/dependency/DependencyGraphBuilder.java +++ b/teavm-core/src/main/java/org/teavm/dependency/DependencyGraphBuilder.java @@ -84,7 +84,7 @@ class DependencyGraphBuilder { if (tryCatch.getExceptionType() != null) { exceptions[i] = dependencyChecker.getClassSource().get(tryCatch.getExceptionType()); } - vars[i] = methodDep.getVariable(i); + vars[i] = methodDep.getVariable(tryCatch.getExceptionVariable().getIndex()); } return new ExceptionConsumer(dependencyChecker, exceptions, vars, methodDep); }