diff --git a/src/ast/conditions/switch/switchStatement.cpp b/src/ast/conditions/switch/switchStatement.cpp index 5326116..14add0d 100644 --- a/src/ast/conditions/switch/switchStatement.cpp +++ b/src/ast/conditions/switch/switchStatement.cpp @@ -75,8 +75,8 @@ void SwitchStatement::generateIL(std::vector &instrs, ILContext &context, //if there is corresponding label for node, make label try { //is a switch case or default - deadCode = false; SwitchCasePtr switchCase = Utils::tryCast(switchBlockBranches[i], "node is not a switch case"); + deadCode = false; std::string label = labels[labelIndex++]; instrs.push_back(Instr::makeLabel(label)); switchCase->getScopeBlock()->generateIL(instrs, context, destReg);