[COMPILER]
* BUG: Now a FOR loop with no loop variable correctly raises a syntax error. git-svn-id: svn://localhost/gambas/trunk@5637 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
f34cf10b7e
commit
59756d47e5
2 changed files with 3 additions and 2 deletions
|
@ -960,7 +960,8 @@ void TRANS_for(void)
|
|||
|
||||
control_enter(RS_FOR);
|
||||
|
||||
TRANS_affectation(FALSE);
|
||||
if (!TRANS_affectation(FALSE))
|
||||
THROW(E_SYNTAX);
|
||||
|
||||
if (!CODE_check_pop_local_last(&local))
|
||||
THROW("Loop variable must be local");
|
||||
|
|
|
@ -698,7 +698,7 @@ bool TRANS_affectation(bool dup)
|
|||
look++;
|
||||
}
|
||||
|
||||
if (!equal)
|
||||
if (!equal || look == JOB->current)
|
||||
return FALSE;
|
||||
|
||||
left = JOB->current;
|
||||
|
|
Loading…
Reference in a new issue