mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 11:48:04 +02:00

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 -
24 lines
294 B
ObjectPascal
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.
|
|
|