2020-06-18 23:17:13 +03:00
|
|
|
|
// Это холостой тест. В оригинале было where G: integer но это мы запретили
|
|
|
|
|
|
|
2015-05-14 22:35:07 +03:00
|
|
|
|
type cl<T> = class where T: constructor;
|
2020-06-18 23:17:13 +03:00
|
|
|
|
public procedure pr<G>(a: IEnumerable<G>); where G: record;
|
2015-05-14 22:35:07 +03:00
|
|
|
|
begin
|
|
|
|
|
|
var tt := a.OrderBy(x -> begin var d: T := new T(); result := x end).ToList;
|
2020-06-18 23:17:13 +03:00
|
|
|
|
//assert(tt[0] = 1);
|
|
|
|
|
|
//assert(tt[1] = 2);
|
|
|
|
|
|
//assert(tt[2] = 3);
|
2015-05-14 22:35:07 +03:00
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
|
|
var t := new cl<integer>();
|
|
|
|
|
|
t.pr(Seq(3,2,1));
|
|
|
|
|
|
end.
|