Is this the correct syntax for a constrained generic? The Oxygene docs on generics do not show a semicolon at the end of the where statement, but the compiler seems to require it.
type
BaseView<T> = public class
where T is BasePresenter;
public
method SetPresenter (presenter: T); virtual;
end;
type
List<T> = public class
where T is IComparable, T has constructor
public
method New: T;
begin
result := new T; // made possible because of `where T has constructor`
Add(result);
end;
method Sort();
begin
... complex sorting code
if self[a].CompareTo(self[b]) then // made possible by `where T is IComparable`
Switch(a,b);
... more complex sorting code
end;