mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-06 07:47:32 +01:00
Fix for Mantis #27424.
pgenutil.pas: * parse_generic_parameters: a ';' terminates a parameter group, so correctly adjust firstidx in that case + added test git-svn-id: trunk@29685 -
This commit is contained in:
parent
8e2f8d7f3c
commit
04534d5dcf
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -14249,6 +14249,7 @@ tests/webtbs/tw2736.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw2737.pp svneol=native#text/plain
|
tests/webtbs/tw2737.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2738.pp svneol=native#text/plain
|
tests/webtbs/tw2738.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2739.pp svneol=native#text/plain
|
tests/webtbs/tw2739.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw27424.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw2758.pp svneol=native#text/plain
|
tests/webtbs/tw2758.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2763.pp svneol=native#text/plain
|
tests/webtbs/tw2763.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2765.pp svneol=native#text/plain
|
tests/webtbs/tw2765.pp svneol=native#text/plain
|
||||||
|
|||||||
@ -1130,7 +1130,11 @@ uses
|
|||||||
firstidx:=result.count;
|
firstidx:=result.count;
|
||||||
|
|
||||||
constraintdata.free;
|
constraintdata.free;
|
||||||
end;
|
end
|
||||||
|
else
|
||||||
|
if token=_SEMICOLON then
|
||||||
|
{ a semicolon terminates a type parameter group }
|
||||||
|
firstidx:=result.count;
|
||||||
until not (try_to_consume(_COMMA) or try_to_consume(_SEMICOLON));
|
until not (try_to_consume(_COMMA) or try_to_consume(_SEMICOLON));
|
||||||
block_type:=old_block_type;
|
block_type:=old_block_type;
|
||||||
end;
|
end;
|
||||||
|
|||||||
22
tests/webtbs/tw27424.pp
Normal file
22
tests/webtbs/tw27424.pp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{ %NORUN }
|
||||||
|
|
||||||
|
program tw27424;
|
||||||
|
|
||||||
|
{$mode objfpc}
|
||||||
|
|
||||||
|
type
|
||||||
|
TType = class(TObject)
|
||||||
|
end;
|
||||||
|
|
||||||
|
generic TTest<T1; T2: TType> = class(TObject)
|
||||||
|
end;
|
||||||
|
|
||||||
|
TFoo = class(TType)
|
||||||
|
end;
|
||||||
|
|
||||||
|
TBar = class(specialize TTest<string, TFoo>)
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
|
||||||
|
end.
|
||||||
Loading…
Reference in New Issue
Block a user