mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-28 01:19:28 +02:00
* introduction of in_generic in r20699 was unneeded, replaced by parse_generic
git-svn-id: trunk@20858 -
This commit is contained in:
parent
4c472a1569
commit
ce845bf97c
@ -178,10 +178,6 @@ interface
|
||||
arrays, records and objects are checked recursively }
|
||||
function is_valid_for_default(def:tdef):boolean;
|
||||
|
||||
{ returns true if currently a generic declaration or definition is parsed/compiled,
|
||||
regardless if it's a subroutine or type }
|
||||
function in_generic : boolean;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
@ -3018,11 +3014,4 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
function in_generic: boolean;
|
||||
begin
|
||||
result:=(assigned(current_structdef) and (df_generic in current_structdef.defoptions)) or
|
||||
(assigned(current_procinfo) and (df_generic in current_procinfo.procdef.defoptions));
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
|
@ -151,7 +151,7 @@ implementation
|
||||
Message(parser_e_illegal_expression);
|
||||
end;
|
||||
else
|
||||
if not(in_generic) then
|
||||
if not(parse_generic) then
|
||||
Message(parser_e_illegal_expression);
|
||||
end;
|
||||
current_tokenpos:=storetokenpos;
|
||||
|
@ -173,7 +173,7 @@ implementation
|
||||
if is_constnode(n) then
|
||||
IncompatibleTypes(n.resultdef, def)
|
||||
else
|
||||
if not(in_generic) then
|
||||
if not(parse_generic) then
|
||||
Message(parser_e_illegal_expression);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user