To restrict what classes are allowed to be used with the template (so assumptions in code can be made about the interface all template variants will share) I propose to extend the synctax of templates from
class MyTemplate<Class T>
to
class MyTemplate<BaseType T>
which would be the equivalent to c#'s class MyTemplate<T> where T : BaseType
It should not introduce any new syntax parsing-wise and does not break existing use where people just have set the default to Class for now.
EDIT
I appears that this should generally work already but only if the restrictive type is part of a lower script module. So maybe this is a bug?
class TemplateRestriction { } class TemplateTest<TemplateRestriction T> { }
Returns Bad type 'TemplateRestriction'