pascalabcnet/TestSuite/records23.pas
Ivan Bondarev 91096e39d1 #2548
2021-10-24 10:46:59 +02:00

17 lines
485 B
ObjectPascal
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

procedure p1<T>;
begin
// Обязательно использовать T - шаблонный параметр p1
// С пользовательским типом вместо KeyValuePair не воспроизводится
var a: KeyValuePair<T,word>;
// Обязательно сравнить на равенство
assert(a = a);
assert(not (a <> a));
var b: KeyValuePair<integer,word>;
assert(b = b);
assert(not (b <> b));
end;
begin
p1&<byte>;
end.