** Changed in: zorba
    Milestone: None => 2.7

** Changed in: zorba
       Status: In Progress => Fix Committed

You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.

  type errors cause ugly error msgs

Status in Zorba - The XQuery Processor:
  Fix Committed

Bug description:
  A query like this

  declare function local:foo() as empty-sequence()
     <foo />

  causes the following error msg because of a type error:

  <?xml version="1.0" encoding="UTF-8"?>
  </Users/wcandillon/tmp/test.xq>:3,3: type error [err:XPTY0004]: Cannot
  treat [NodeXQType elementNode nametest=[uri: , local: foo]
  content=[XQType ANY_TYPE_KIND*]] as [XQType NONE_KIND] when returning
  the result of the function local:foo().; raised at
  local:foo#0 <http://www.w3.org/2005/xquery-local-functions>
  /Users/wcandillon/tmp/test.xq at line 6 column 1

  This is very ugly und not understandable for someone who is not
  involved in the zorba internals. We need an error msg like this:

  Stopped at line 1, column 17: [XPTY0004] Can't promote type xs:string
  to empty-sequence(): "abc".

To manage notifications about this bug go to:

Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to