mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 03:46:10 +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(is_open_string(parasym.vardef)) and
|
||||||
not(equal_defs(left.resultdef,parasym.vardef)) then
|
not(equal_defs(left.resultdef,parasym.vardef)) then
|
||||||
begin
|
begin
|
||||||
current_filepos:=left.fileinfo;
|
CGMessagePos(left.fileinfo,type_e_strict_var_string_violation);
|
||||||
CGMessage(type_e_strict_var_string_violation);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Handle formal parameters separate }
|
{ Handle formal parameters separate }
|
||||||
|
@ -363,6 +363,7 @@ implementation
|
|||||||
l : Longint;
|
l : Longint;
|
||||||
lr,hr : TConstExprInt;
|
lr,hr : TConstExprInt;
|
||||||
hp : tarrayconstructornode;
|
hp : tarrayconstructornode;
|
||||||
|
oldfilepos: tfileposinfo;
|
||||||
begin
|
begin
|
||||||
if p.nodetype<>arrayconstructorn then
|
if p.nodetype<>arrayconstructorn then
|
||||||
internalerror(200205105);
|
internalerror(200205105);
|
||||||
@ -407,6 +408,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
if codegenerror then
|
if codegenerror then
|
||||||
break;
|
break;
|
||||||
|
oldfilepos:=current_filepos;
|
||||||
current_filepos:=p2.fileinfo;
|
current_filepos:=p2.fileinfo;
|
||||||
case p2.resultdef.typ of
|
case p2.resultdef.typ of
|
||||||
enumdef,
|
enumdef,
|
||||||
@ -535,6 +537,7 @@ implementation
|
|||||||
hp:=tarrayconstructornode(tarrayconstructornode(p2).right);
|
hp:=tarrayconstructornode(tarrayconstructornode(p2).right);
|
||||||
tarrayconstructornode(p2).right:=nil;
|
tarrayconstructornode(p2).right:=nil;
|
||||||
p2.free;
|
p2.free;
|
||||||
|
current_filepos:=oldfilepos;
|
||||||
end;
|
end;
|
||||||
if (hdef=nil) then
|
if (hdef=nil) then
|
||||||
hdef:=u8inttype;
|
hdef:=u8inttype;
|
||||||
|
@ -384,8 +384,7 @@ implementation
|
|||||||
(left.nodetype in [stringconstn])
|
(left.nodetype in [stringconstn])
|
||||||
) then
|
) then
|
||||||
begin
|
begin
|
||||||
current_filepos:=left.fileinfo;
|
CGMessagePos(left.fileinfo,type_e_no_addr_of_constant);
|
||||||
CGMessage(type_e_no_addr_of_constant);
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user