fpc/tests/webtbs/tw25917.pp
svenbarth 0d1d3d8e72 Fix for Mantis . With this change the visibility of type parameters is changed from public to strict private as otherwise unexpected (and "unworkaroundable") errors might occur (like the one in the mentioned bug report).
pgenutil.pas:
  * parse_generic_parameters & insert_generic_parameter_types: create the type parameter symbols as strict private instead of public (which is the default visiblity)

* adjusted two tests which relied on this behavior (that's why I fixed the type aliases previously)
+ added test

git-svn-id: trunk@29486 -
2015-01-16 17:02:02 +00:00

35 lines
356 B
ObjectPascal

{ %NORUN }
program tw25917;
{$APPTYPE CONSOLE}
{$MODE DELPHI}
type
TA<T1, T2> = class
end;
TB<T1, T2> = class
private
type
T3 = record end;
TC = class(TA<T1, T3>)
public
procedure Foo;
end;
end;
procedure TB<T1, T2>.TC.Foo;
var
L: TB<T1, T2>.T3;
begin
end;
var
x: TB<Pointer, Pointer>;
begin
end.