[Bug 9252] [XQuery 1.1] Error handling in switch expression

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


Jonathan Robie <jonathan.robie@redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




--- Comment #5 from Jonathan Robie <jonathan.robie@redhat.com>  2010-06-27 21:36:54 ---
I am reopening this because there are one substantive issue that needs to be
decided by the WG:

>From the original bug report - what are the rules for reporting static errors?

> (f) None of this applies to static errors or type errors, and this should
> perhaps be explicitly stated. In [1..3] the rule does say that it refers only
> to "dynamic errors", but there is no such qualification in rule [4]; a reader
> might infer that type errors in cases after the effective case are not to be
> reported. This does raise a question about when type errors could/should/must
> be reported, for example in
> 
> switch ($x)
> case "string" return "a"
> case 42 return "b"
> default return "c"

Comment #1 raises another issue that looks substantive:

> Presumably it's reasonable to raise a warning if there is a case clause that
> can never fire because the types are disjoint.

However, warnings in XQuery are entirely implementation-defined, so this is not
something the specification can or should address.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Sunday, 27 June 2010 21:37:00 UTC