Fix for revision 23344.

pgenutil.pas, generate_specialization:
  in case of "assigned(parsedtype)" an ">" could immediately follow (only one type parameter), so don't necessarily expect a type identifier

git-svn-id: trunk@23347 -
This commit is contained in:
svenbarth 2013-01-09 09:12:39 +00:00
parent 97d7a4ff50
commit fdb1950227

View File

@ -412,7 +412,7 @@ uses
consume(_LSHARPBRACKET); consume(_LSHARPBRACKET);
gencount:=0; gencount:=0;
{ handle "<>" } { handle "<>" }
if (token=_RSHARPBRACKET) or (token=_GT) then if not first and ((token=_RSHARPBRACKET) or (token=_GT)) then
Message(type_e_type_id_expected) Message(type_e_type_id_expected)
else else
repeat repeat
@ -485,16 +485,17 @@ uses
end; end;
if not assigned(parsedtype) and not try_to_consume(_LT) then if not assigned(parsedtype) and not try_to_consume(_LT) then
consume(_LSHARPBRACKET);
{ handle "<>" }
if (token=_GT) or (token=_RSHARPBRACKET) then
begin begin
Message(type_e_type_id_expected); consume(_LSHARPBRACKET);
if not try_to_consume(_GT) then { handle "<>" }
try_to_consume(_RSHARPBRACKET); if (token=_GT) or (token=_RSHARPBRACKET) then
tt:=generrordef; begin
exit; Message(type_e_type_id_expected);
if not try_to_consume(_GT) then
try_to_consume(_RSHARPBRACKET);
tt:=generrordef;
exit;
end;
end; end;
genericdeflist:=TFPObjectList.Create(false); genericdeflist:=TFPObjectList.Create(false);