mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 17:47:56 +02:00

in "array_dec" and "procvar_dec" "parse_generic" needs to be true if the currently parsed declaration (array or procvar) is declared inside a generic, because only then specializations of other types (it does not matter whether they are inline or in a type section of the current generic) are parsed correctly (this fixes Mantis #20577 and Mantis #20955 ) + add tests for the mentioned bug reports (testing only the array case) (tests\webtbs) and tests for the procvar case (tests\test) git-svn-id: trunk@19953 -
24 lines
484 B
ObjectPascal
24 lines
484 B
ObjectPascal
{ %NORUN }
|
|
|
|
{ This tests that one can use a specialization of another generic which was
|
|
introduced in the currently parsed generic can be used as a parameter type
|
|
in a procedure variable introduced in the current generic as well }
|
|
program tgeneric71;
|
|
|
|
{$mode objfpc}
|
|
|
|
type
|
|
generic TSomeGeneric<T> = class
|
|
|
|
end;
|
|
|
|
generic TSomeOtherGeneric<T> = class
|
|
type
|
|
TSomeGenericT = specialize TSomeGeneric<T>;
|
|
TSomeProc = procedure(aParam: TSomeGenericT);
|
|
end;
|
|
|
|
begin
|
|
|
|
end.
|