fpc/tests/webtbs/tw25929.pp
svenbarth a08e8ff982 Fix for Mantis #25929
* ninl.pas, tinlinenode.handle_default.getdefaultvarsym:
    prefix the default variable's name with a "$zero" instead of a "zero" and use only the string from the second character on for comparisons so that findwithhash() and checkduplicates() generate consistent results

+ added test

git-svn-id: trunk@27320 -
2014-03-28 14:45:18 +00:00

26 lines
281 B
ObjectPascal

{ %NORUN }
program tw25929;
{$MODE DELPHI}
type
TR<T> = record
end;
TA<T> = class
procedure Foo;
end;
procedure TA<T>.Foo;
var
r: TR<T>;
begin
r := Default(TR<T>);
r := Default(TR<T>); // Error: Duplicate identifier "zero_$P$PLC03_$$_TR$1"
end;
begin
end.