Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba.
Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/104556 Fixed bug #862971 (no error upon duplicate function declarations) -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/104556 Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog' --- ChangeLog 2012-05-03 10:41:02 +0000 +++ ChangeLog 2012-05-03 13:12:20 +0000 @@ -23,6 +23,7 @@ * Fixed bugs #931501 and #866987 (improved error messages for fn:format-number(). Additionally, the function now throws the FODF1310 error instead of XTDE1310, as the 3.0 spec requires) * Fixed bug 955170 (Catch clause with URILiteral-based wilcard NameTest) * Fixed memory leak in case of index truncation + * Fixed bug #862971 (no error upon duplicate function declarations) * Fixed bug in mergeUpdates() method * Fixed bug 955135 (err:XQDY0044 not caught by try-catch expressions) * Fixed bug #986075 (encountering flwor expr with no clauses; due to common subexression being formed when inlining var in if-then-else expression) === modified file 'src/compiler/translator/translator.cpp' --- src/compiler/translator/translator.cpp 2012-05-03 10:41:02 +0000 +++ src/compiler/translator/translator.cpp 2012-05-03 13:12:20 +0000 @@ -3279,6 +3279,11 @@ if (f.getp() != 0) { + if (f->isUdf()) + { + RAISE_ERROR(err::XQST0034, loc, ERROR_PARAMS(qnameItem->getStringValue())); + } + // We make sure that the types of the parameters and the return type // are subtypes of the ones declared in the module const signature& s = f->getSignature(); === modified file 'src/context/static_context.cpp' --- src/context/static_context.cpp 2012-05-03 10:41:02 +0000 +++ src/context/static_context.cpp 2012-05-03 13:12:20 +0000 @@ -2293,9 +2293,7 @@ if (!is_global_root_sctx() && lookup_local_fn(qname, arity) != NULL) { - throw XQUERY_EXCEPTION( - err::XQST0034, ERROR_PARAMS( qname->getStringValue() ), ERROR_LOC( loc ) - ); + RAISE_ERROR(err::XQST0034, loc, ERROR_PARAMS(qname->getStringValue())); } if (theFunctionMap == NULL) === added file 'test/rbkt/Queries/zorba/modules/dupl_func_decl.spec' --- test/rbkt/Queries/zorba/modules/dupl_func_decl.spec 1970-01-01 00:00:00 +0000 +++ test/rbkt/Queries/zorba/modules/dupl_func_decl.spec 2012-05-03 13:12:20 +0000 @@ -0,0 +1,1 @@ +Error: http://www.w3.org/2005/xqt-errors:XQST0034 === added file 'test/rbkt/Queries/zorba/modules/dupl_func_decl.xq' --- test/rbkt/Queries/zorba/modules/dupl_func_decl.xq 1970-01-01 00:00:00 +0000 +++ test/rbkt/Queries/zorba/modules/dupl_func_decl.xq 2012-05-03 13:12:20 +0000 @@ -0,0 +1,4 @@ + +import module namespace foo="http://www.foo.com" at "dupl_func_decl.xqlib"; + +foo:f(1) === added file 'test/rbkt/Queries/zorba/modules/dupl_func_decl.xqlib' --- test/rbkt/Queries/zorba/modules/dupl_func_decl.xqlib 1970-01-01 00:00:00 +0000 +++ test/rbkt/Queries/zorba/modules/dupl_func_decl.xqlib 2012-05-03 13:12:20 +0000 @@ -0,0 +1,10 @@ +module namespace foo = "http://www.foo.com"; + + +declare function foo:f( $i as xs:integer ) +{ + $i + 2 +}; + + +declare function foo:f( $i as xs:integer ) external;
-- 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