pascalabcnet/TestSuite/generics65.pas
Ivan Bondarev af106375a9 #2589
2022-06-19 11:16:34 +02:00

13 lines
301 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.

type
// Не важно запись или класс, но обязательно пользовательский тип
t1 = class end;
procedure p1<TList>(l: TList); where TList: IList<t1>;
begin
assert(l.Count = 0);
assert(not l.Contains(new t1));
end;
begin
p1(new t1[0]);
end.