diff --git a/core/src/main/java/org/teavm/backend/c/generate/ClassGenerator.java b/core/src/main/java/org/teavm/backend/c/generate/ClassGenerator.java index bd1c5a768..5bdc84c7d 100644 --- a/core/src/main/java/org/teavm/backend/c/generate/ClassGenerator.java +++ b/core/src/main/java/org/teavm/backend/c/generate/ClassGenerator.java @@ -63,6 +63,7 @@ import org.teavm.model.classes.TagRegistry; import org.teavm.model.classes.VirtualTable; import org.teavm.model.classes.VirtualTableEntry; import org.teavm.model.instructions.AbstractInstructionVisitor; +import org.teavm.model.instructions.CastInstruction; import org.teavm.model.instructions.ClassConstantInstruction; import org.teavm.model.instructions.ConstructArrayInstruction; import org.teavm.model.instructions.ConstructInstruction; @@ -190,6 +191,11 @@ public class ClassGenerator { addType(insn.getType()); } + @Override + public void visit(CastInstruction insn) { + addType(insn.getTargetType()); + } + @Override public void visit(ConstructMultiArrayInstruction insn) { ValueType type = insn.getItemType();