<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>7925</bug_id>
          
          <creation_ts>2009-10-15 08:04:19 +0000</creation_ts>
          <short_desc>[XQTS]: CVS: statictyping-24</short_desc>
          <delta_ts>2010-03-16 16:04:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Query Test Suite</product>
          <component>XML Query Test Suite</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Mills">tim</reporter>
          <assigned_to name="Sorin Nasoi">spungi</assigned_to>
          <cc>oliver</cc>
    
    <cc>spungi</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>28361</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2009-10-15 08:04:19 +0000</bug_when>
    <thetext>This test, which aims to test the resolution of Bug 5651, should probably expect FORG0006 rather than XPTY0004 in keeping with fn:boolean.  

(:*******************************************************:)
(:Name: statictyping-24                                  :)
(:Written By: Sorin Nasoi                                :)
(:Description: Evaluation of static typing feature within:)
(:a &quot;where&quot; clause.                                      :)
(:Wrong operand for expression (uses fn:not)             :)
(:*******************************************************:)

(: insert-start :)
declare variable $input-context1 external;
(: insert-end :)

let $var := (&quot;a&quot;,&quot;b&quot;,&quot;c&quot;)
where fn:not($var) eq fn:true()
return $var</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29168</commentid>
    <comment_count>1</comment_count>
    <who name="Sorin Nasoi">spungi</who>
    <bug_when>2009-10-28 10:40:12 +0000</bug_when>
    <thetext>This test expects FORG0006, not XPTY0004 as stated in the cat/STFLWORExpr.xml:

&lt;test-case is-XPath2=&quot;false&quot; name=&quot;statictyping-24&quot;
           FilePath=&quot;StaticTyping/STFLWORExpr/&quot;
           scenario=&quot;runtime-error&quot;
   [...]     
   &lt;expected-error&gt;FORG0006&lt;/expected-error&gt;
&lt;/test-case&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29197</commentid>
    <comment_count>2</comment_count>
    <who name="Oliver Hallam">oliver</who>
    <bug_when>2009-10-29 14:25:31 +0000</bug_when>
    <thetext>In a static typing implementation the error that should be raised is XPTY0004, and not FORG0006.  Since this is a static-typing query the expected error should be changed to XPTY0004.  

This is because the only static typing rule for fn:boolean is:

statEnv |-  Type &lt;: (empty | NodeType+ | xs:boolean | xs:string | xs:untypedAtomic | fs:numeric | xs:anyURI)
--------------------------------------------------
statEnv  |-  (FN-URI,&quot;boolean&quot;)(Type) : xs:boolean

and so the query should result in a static type error (XPTY0004)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>