[Bug 2999] typeswitch: how to handle case clauses specifying the same type

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2999





------- Comment #2 from mike@saxonica.com  2006-03-12 21:40 -------
I have some sympathy with making this an error, however I don't think it's
trivial to do. It would be odd to have an error where the types are identical
and not where the first type subsumes the second. Neither identity nor
subsumption of types are trivial to define (is element() identical to
element(*)?); at present this is done only in the formal semantics, and need
only be implemented by products that implement the static typing option. It
might be better to leave this as one of the many places where we allow
implementations to raise a warning. 

Michael Kay
(personal response)

Received on Sunday, 12 March 2006 21:40:34 UTC