test for #2829
This commit is contained in:
parent
4f3fcec941
commit
9721cf3c67
16
TestSuite/where21.pas
Normal file
16
TestSuite/where21.pas
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
type
|
||||
c1<T1> = class
|
||||
where T1: IComparable<T1>;
|
||||
|
||||
function f1<T2>(o: T2): integer;
|
||||
where T2: T1;
|
||||
begin
|
||||
Result := {T1}(o).CompareTo({T1}(o));
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
begin
|
||||
var a := new c1<string>;
|
||||
assert(a.f1('abc') = 0);
|
||||
end.
|
||||
Loading…
Reference in a new issue