mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-20 22:38:16 +02:00
Mantis #25236 was fixed by partial specializations addition in revision 27861
+ added test git-svn-id: trunk@27902 -
This commit is contained in:
parent
45e2e91536
commit
81c7b22199
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -13912,6 +13912,7 @@ tests/webtbs/tw25169.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw25170.pp svneol=native#text/plain
|
tests/webtbs/tw25170.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw25198.pp svneol=native#text/plain
|
tests/webtbs/tw25198.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw25210.pp svneol=native#text/pascal
|
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/tw2525.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw25255.pp svneol=native#text/pascal
|
tests/webtbs/tw25255.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw25269.pp svneol=native#text/pascal
|
tests/webtbs/tw25269.pp svneol=native#text/pascal
|
||||||
|
26
tests/webtbs/tw25236.pp
Normal file
26
tests/webtbs/tw25236.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user