mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 19:02:05 +02:00
* in case there hasn't been an error generated with an invalid attribute declaration then print at least "illegal expression" error
This commit is contained in:
parent
3dc64dd67e
commit
c7776d899b
@ -460,6 +460,7 @@ implementation
|
||||
|
||||
var
|
||||
p,paran,pcalln,ptmp : tnode;
|
||||
ecnt : longint;
|
||||
i,pcount : sizeint;
|
||||
paras : array of tnode;
|
||||
od : tobjectdef;
|
||||
@ -494,6 +495,7 @@ implementation
|
||||
|
||||
pcalln:=ccallnode.create(paran,tprocsym(constrsym),od.symtable,cloadvmtaddrnode.create(p),[],nil);
|
||||
p:=nil;
|
||||
ecnt:=errorcount;
|
||||
typecheckpass(pcalln);
|
||||
|
||||
if (pcalln.nodetype=calln) and assigned(tcallnode(pcalln).procdefinition) and not codegenerror then
|
||||
@ -555,8 +557,12 @@ implementation
|
||||
paras[i].free;
|
||||
end;
|
||||
end
|
||||
else
|
||||
else begin
|
||||
{ provide *some* error in case there hasn't been one }
|
||||
if errorcount=ecnt then
|
||||
message(parser_e_illegal_expression);
|
||||
pcalln.free;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user