Mantis was fixed by partial specializations addition in revision 27861

+ added test

git-svn-id: trunk@27902 -
This commit is contained in:
svenbarth 2014-06-08 15:51:33 +00:00
parent 45e2e91536
commit 81c7b22199
2 changed files with 27 additions and 0 deletions

1
.gitattributes vendored
View File

@ -13912,6 +13912,7 @@ tests/webtbs/tw25169.pp svneol=native#text/plain
tests/webtbs/tw25170.pp svneol=native#text/plain
tests/webtbs/tw25198.pp svneol=native#text/plain
tests/webtbs/tw25210.pp svneol=native#text/pascal
tests/webtbs/tw25236.pp svneol=native#text/pascal
tests/webtbs/tw2525.pp svneol=native#text/plain
tests/webtbs/tw25255.pp svneol=native#text/pascal
tests/webtbs/tw25269.pp svneol=native#text/pascal

26
tests/webtbs/tw25236.pp Normal file
View File

@ -0,0 +1,26 @@
{ %NORUN }
program tw25236;
{$mode delphi}
type
TCompare<T> = function(const A, B: T): Integer;
TList<T> = class
public
type TListCompare = TCompare<T>;
private
{$define bug}
{$ifdef bug}
{Error: Generics without specialization cannot be used as a type for a variable}
FComparer: TListCompare;
{$else}
FComparer: TCompare<T>;
{$endif}
public
property Comparer: TListCompare read FComparer write FComparer;
end;
begin
end.