mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-24 02:11:43 +02:00
* fixed two places where after r1913 valid_for_assign() didn't immediately
exit anymore if an error was detected git-svn-id: trunk@18098 -
This commit is contained in:
parent
981e79ff37
commit
0d4d1a2ac8
@ -1322,9 +1322,8 @@ implementation
|
|||||||
(vo_is_loop_counter in tsubscriptnode(hp).vs.varoptions) then
|
(vo_is_loop_counter in tsubscriptnode(hp).vs.varoptions) then
|
||||||
begin
|
begin
|
||||||
if report_errors then
|
if report_errors then
|
||||||
CGMessage1(parser_e_illegal_assignment_to_count_var,tsubscriptnode(hp).vs.realname)
|
CGMessage1(parser_e_illegal_assignment_to_count_var,tsubscriptnode(hp).vs.realname);
|
||||||
else
|
exit;
|
||||||
exit;
|
|
||||||
end;
|
end;
|
||||||
{ implicit pointer object types result in dereferencing }
|
{ implicit pointer object types result in dereferencing }
|
||||||
hp:=tsubscriptnode(hp).left;
|
hp:=tsubscriptnode(hp).left;
|
||||||
@ -1475,10 +1474,11 @@ implementation
|
|||||||
if not(Valid_Const in opts) and
|
if not(Valid_Const in opts) and
|
||||||
not gotderef and
|
not gotderef and
|
||||||
(vo_is_loop_counter in tabstractvarsym(tloadnode(hp).symtableentry).varoptions) then
|
(vo_is_loop_counter in tabstractvarsym(tloadnode(hp).symtableentry).varoptions) then
|
||||||
if report_errors then
|
begin
|
||||||
CGMessage1(parser_e_illegal_assignment_to_count_var,tloadnode(hp).symtableentry.realname)
|
if report_errors then
|
||||||
else
|
CGMessage1(parser_e_illegal_assignment_to_count_var,tloadnode(hp).symtableentry.realname);
|
||||||
exit;
|
exit;
|
||||||
|
end;
|
||||||
{ read-only variable? }
|
{ read-only variable? }
|
||||||
if (tabstractvarsym(tloadnode(hp).symtableentry).varspez in [vs_const,vs_constref]) then
|
if (tabstractvarsym(tloadnode(hp).symtableentry).varspez in [vs_const,vs_constref]) then
|
||||||
begin
|
begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user