* don't change current_filepos in pass_typecheck when not generating

errornodes (so the that the parser won't afterwards suddenly start
    creating nodes with this different fileinfo)

git-svn-id: trunk@13577 -
This commit is contained in:
Jonas Maebe 2009-08-22 20:21:56 +00:00
parent 8dbc728926
commit acdb0bbb3e
3 changed files with 5 additions and 4 deletions

View File

@ -750,8 +750,7 @@ implementation
not(is_open_string(parasym.vardef)) and
not(equal_defs(left.resultdef,parasym.vardef)) then
begin
current_filepos:=left.fileinfo;
CGMessage(type_e_strict_var_string_violation);
CGMessagePos(left.fileinfo,type_e_strict_var_string_violation);
end;
{ Handle formal parameters separate }

View File

@ -363,6 +363,7 @@ implementation
l : Longint;
lr,hr : TConstExprInt;
hp : tarrayconstructornode;
oldfilepos: tfileposinfo;
begin
if p.nodetype<>arrayconstructorn then
internalerror(200205105);
@ -407,6 +408,7 @@ implementation
end;
if codegenerror then
break;
oldfilepos:=current_filepos;
current_filepos:=p2.fileinfo;
case p2.resultdef.typ of
enumdef,
@ -535,6 +537,7 @@ implementation
hp:=tarrayconstructornode(tarrayconstructornode(p2).right);
tarrayconstructornode(p2).right:=nil;
p2.free;
current_filepos:=oldfilepos;
end;
if (hdef=nil) then
hdef:=u8inttype;

View File

@ -384,8 +384,7 @@ implementation
(left.nodetype in [stringconstn])
) then
begin
current_filepos:=left.fileinfo;
CGMessage(type_e_no_addr_of_constant);
CGMessagePos(left.fileinfo,type_e_no_addr_of_constant);
exit;
end;