fpc/tests/test/tgeneric71.pp
svenbarth 17a276aabc * compiler\pdecl.pas:
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 -
2012-01-02 16:02:51 +00:00

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.