This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 7925 - [XQTS]: CVS: statictyping-24
Summary: [XQTS]: CVS: statictyping-24
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Sorin Nasoi
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-15 08:04 UTC by Tim Mills
Modified: 2010-03-16 16:04 UTC (History)
2 users (show)

See Also:


Attachments

Description Tim Mills 2009-10-15 08:04:19 UTC
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 "where" clause.                                      :)
(:Wrong operand for expression (uses fn:not)             :)
(:*******************************************************:)

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

let $var := ("a","b","c")
where fn:not($var) eq fn:true()
return $var
Comment 1 Sorin Nasoi 2009-10-28 10:40:12 UTC
This test expects FORG0006, not XPTY0004 as stated in the cat/STFLWORExpr.xml:

<test-case is-XPath2="false" name="statictyping-24"
           FilePath="StaticTyping/STFLWORExpr/"
           scenario="runtime-error"
   [...]     
   <expected-error>FORG0006</expected-error>
</test-case>
Comment 2 Oliver Hallam 2009-10-29 14:25:31 UTC
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 <: (empty | NodeType+ | xs:boolean | xs:string | xs:untypedAtomic | fs:numeric | xs:anyURI)
--------------------------------------------------
statEnv  |-  (FN-URI,"boolean")(Type) : xs:boolean

and so the query should result in a static type error (XPTY0004)