mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 14:19:31 +02:00
* 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:
parent
8dbc728926
commit
acdb0bbb3e
@ -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 }
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user