Fix for GitHub issue #163 : assertion failure caused by syntax error in task.

This commit is contained in:
Martin Whitaker 2017-09-28 19:24:04 +01:00
parent a1a7f5deff
commit 3566ff4cd4
1 changed files with 4 additions and 1 deletions

View File

@ -2044,7 +2044,10 @@ task_declaration /* IEEE1800-2005: A.2.7 */
| K_task lifetime_opt IDENTIFIER error K_endtask
{
assert(current_task == 0);
if (current_task) {
pform_pop_scope();
current_task = 0;
}
}
endlabel_opt
{ // Last step: check any closing name. This is done late so