fpc/tests/webtbs/tw20851.pp
svenbarth 9cb16c950f This fixes Mantis #20851 .
For the solution symbols will now contain a "sp_explicitrename" flag if they
were created through a type rename. This is necessary, because we can't
decide whether a type is a renamed generic para which contains by default a
reference to the default undefined def. Using individual undefined defs will
lead to duplicate identifiers as they are created before a symtable was
pushed (thus they'll ba part of whatever symtable is at the top). 

+ symconst.pas, tsymoption:
        Add a new option "sp_explicitrename" which will be used to track type
        renames.
+ pdecl.pas, type_dec:
        Set the new flag if we're dealing with a type rename
* pexpr.pas, factor_read_id:
        If we have an undefined def that is also a rename then we assume that
        it's a rename of a generic parameter
* utils/ppudump.pp:
        Adjustment because of change to tsymoption
* utils/ppu.pp:
        Increase PPU version
+ added test

git-svn-id: trunk@20250 -
2012-02-04 16:03:58 +00:00

20 lines
336 B
ObjectPascal

program genimpl1;
{$ifdef fpc}{$mode delphi}{$else}{$apptype console}{$endif}
Type
tbwimagegen<T> = Class
Type
BaseUnit = T;
procedure alloc;
end;
procedure tbwimagegen<T>.alloc;
var i,j : integer;
begin
j:=sizeof(t);
i:=sizeof(baseunit);
end;
begin
end.