diff --git a/teavm-core/src/main/java/org/teavm/model/emit/ValueEmitter.java b/teavm-core/src/main/java/org/teavm/model/emit/ValueEmitter.java index 479b1955b..e72b238de 100644 --- a/teavm-core/src/main/java/org/teavm/model/emit/ValueEmitter.java +++ b/teavm-core/src/main/java/org/teavm/model/emit/ValueEmitter.java @@ -258,7 +258,7 @@ public class ValueEmitter { GetElementInstruction insn = new GetElementInstruction(); insn.setArray(variable); insn.setIndex(index.variable); - insn.setReceiver(variable); + insn.setReceiver(result); pe.addInstruction(insn); return pe.var(result); }