forked from JavaTX/JavaCompilerCore
Initialize local variables to null
This commit is contained in:
parent
45b80bb6c5
commit
6fb329ae1a
@ -810,6 +810,9 @@ public class Codegen {
|
|||||||
generate(state, varDecl.value());
|
generate(state, varDecl.value());
|
||||||
boxPrimitive(state, varDecl.varType());
|
boxPrimitive(state, varDecl.varType());
|
||||||
mv.visitVarInsn(ASTORE, local.index());
|
mv.visitVarInsn(ASTORE, local.index());
|
||||||
|
} else {
|
||||||
|
mv.visitInsn(ACONST_NULL);
|
||||||
|
mv.visitVarInsn(ASTORE, local.index());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user