pascalabcnet/TestSuite/extensionoperators5.pas
Ivan Bondarev 13c677e66e #880
2021-04-05 15:33:16 +02:00

16 lines
316 B
ObjectPascal

function operator=<T>(x,y: Stack<T>): boolean; extensionmethod;
begin
Result := True
end;
function operator<><T>(x,y: Stack<T>): boolean; extensionmethod;
begin
Result := not(x = y);
end;
begin
var a1 := new Stack<integer>;
var a2 := new Stack<integer>;
assert(a1 = a2);
assert(not (a1 <> a2));
end.