TemplateData forbids multiple parameters with the same name by design (as they’re JSON keys), but aliases are not filtered: I was able to add 1 as the alias of n and nq as well on c:Template:Number cat/doc (this is not simply testing, by the way, the template has been designed so that 1 is actually an alias for both parameters…), and it even gets served to clients. There should be some check to prevent such cases, as clients have no clue what parameter is that.
Since these parameters indeed both have the same alias, isn't that as desired? In practice, only parameters, not aliases, are offered by the GUI interface for Template Data anyway - I think aliases are just for documentation reasons mostly?
It depends. I don’t know about any consumer providing aliases when inserting new parameters, but they’re used to understand already-existing templates (e.g. by VisualEditor template editor).
This problem causes that a parameter name may belong to more than one field. This means that a program parsing wikitext (e.g. VisualEditor template editor) cannot reliably decide which field is given in the wikitext, so it either warns the user (which is almost certainly not the case as long as this behavior is undocumented), or assigns it to one of the possible fields in an undefined or implementation-defined way.