diff --git a/core/src/main/java/org/teavm/model/lowlevel/GCShadowStackContributor.java b/core/src/main/java/org/teavm/model/lowlevel/GCShadowStackContributor.java index 0d794264f..700d07786 100644 --- a/core/src/main/java/org/teavm/model/lowlevel/GCShadowStackContributor.java +++ b/core/src/main/java/org/teavm/model/lowlevel/GCShadowStackContributor.java @@ -307,7 +307,7 @@ public class GCShadowStackContributor { } for (int i = 0; i < newStates.length; ++i) { - if (newStates[i] >= 0 && autoSpilled[newStates[i]]) { + if (newStates[i] >= 0 && autoSpilled[definitionClasses[newStates[i]]]) { comparison[i] = -2; } }