summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsvenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-01-09 09:12:39 +0000
committersvenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-01-09 09:12:39 +0000
commitefb06b3b30dcc42b74052b0607bb4664516432fa (patch)
tree8dfff693883def0125b819504a5eb152d1f3cf85
parent5df1c051209c8061516e194a72fc4ad1ca752734 (diff)
downloadfpc-efb06b3b30dcc42b74052b0607bb4664516432fa.tar.gz
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: http://svn.freepascal.org/svn/fpc/trunk@23347 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--compiler/pgenutil.pas21
1 files changed, 11 insertions, 10 deletions
diff --git a/compiler/pgenutil.pas b/compiler/pgenutil.pas
index e440189ede..f250ba5897 100644
--- a/compiler/pgenutil.pas
+++ b/compiler/pgenutil.pas
@@ -412,7 +412,7 @@ uses
consume(_LSHARPBRACKET);
gencount:=0;
{ handle "<>" }
- if (token=_RSHARPBRACKET) or (token=_GT) then
+ if not first and ((token=_RSHARPBRACKET) or (token=_GT)) then
Message(type_e_type_id_expected)
else
repeat
@@ -485,16 +485,17 @@ uses
end;
if not assigned(parsedtype) and not try_to_consume(_LT) then
- consume(_LSHARPBRACKET);
-
- { handle "<>" }
- if (token=_GT) or (token=_RSHARPBRACKET) then
begin
- Message(type_e_type_id_expected);
- if not try_to_consume(_GT) then
- try_to_consume(_RSHARPBRACKET);
- tt:=generrordef;
- exit;
+ consume(_LSHARPBRACKET);
+ { handle "<>" }
+ if (token=_GT) or (token=_RSHARPBRACKET) then
+ begin
+ Message(type_e_type_id_expected);
+ if not try_to_consume(_GT) then
+ try_to_consume(_RSHARPBRACKET);
+ tt:=generrordef;
+ exit;
+ end;
end;
genericdeflist:=TFPObjectList.Create(false);