Insert missing case

This commit is contained in:
Daniel Holle 2023-06-26 13:14:53 +02:00
parent 9c1e016bb1
commit e1e1f3eafc

View File

@ -782,6 +782,18 @@ public class Codegen {
break; break;
} }
break; break;
case TargetVarDecl varDecl: {
var local = state.createVariable(varDecl.name(), varDecl.varType());
if (varDecl.value() != null) {
generate(state, varDecl.value());
boxPrimitive(state, varDecl.varType());
mv.visitVarInsn(ASTORE, local.index());
} else {
mv.visitInsn(ACONST_NULL);
mv.visitVarInsn(ASTORE, local.index());
}
break;
}
case TargetBinaryOp op: case TargetBinaryOp op:
generateBinaryOp(state, op); generateBinaryOp(state, op);
break; break;