This commit is contained in:
Ivan Bondarev 2023-12-27 20:53:30 +01:00
parent 4f3fcec941
commit 9721cf3c67

16
TestSuite/where21.pas Normal file
View 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.