fpc/tests/webtbs/tw24872.pp
svenbarth af43e5e3e9 Fix for Mantis #24872.
psub.pas, tcgprocinfo.parse_body:
  * also check record symtables besides object symtables to determine whether the staticsymtable is accessed from a globally declared generic
  * use a translateable message if the static symtable is accessed if it should not
msg/errore.msg:
  + add new error message for when the static symtable is accessed from a global generic
msgidx.inc & msgtixt.inc:
  * regenerated

+ added test

git-svn-id: trunk@29427 -
2015-01-06 20:46:12 +00:00

24 lines
294 B
ObjectPascal

{ %NORUN }
program tw24872;
{$mode delphi}
procedure Test;
begin
end;
type
TRec<T> = record {for generic class is ok, and non generic record too}
procedure Foo;
end;
procedure TRec<T>.Foo;
begin
Test
end; // Error: Global Generic template references static symtable
begin
end.