pascalabcnet/TestSuite/generics28.pas

13 lines
232 B
ObjectPascal
Raw Permalink Normal View History

2019-07-04 23:05:57 +03:00
type
SomeType = record(IComparable<SomeType>)
public
function CompareTo(other: SomeType): integer;
begin
Result := 2;
end;
end;
begin
var obj := new SomeType();
assert(obj.CompareTo(obj) = 2);
end.