VariableAssignmentStdAlone

- Removed duplicate instance of `VariableAssignmentInstr`
- Set the context of the created `VariableAssignmentInstr` to be that of the `VariableAssignmentStdAlone`  entity
This commit is contained in:
Tristan B. Velloza Kildaire 2022-12-12 21:10:58 +02:00
parent 01bdb145e2
commit 908356c27b
1 changed files with 4 additions and 3 deletions

View File

@ -712,10 +712,11 @@ public final class TypeChecker
* 3. Generate VarAssignInstruction with Value-instruction
*/
Instruction valueInstr = popInstr();
VariableAssignmentInstr varAssInstr = new VariableAssignmentInstr(variableName, valueInstr);
VariableAssignmentInstr vAInstr = new VariableAssignmentInstr(variableName, valueInstr);
/* Set the VariableAssigmmentInstruction's context to that of the stdalone entity */
vAInstr.context = vasa.getContext();
addInstrB(vAInstr);
}
/* Case of no matches */