Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch 
into lp:zorba.

Commit message:
Fixed bug #1152834 (bug in computing the scripting kind of array and object  
constructor exprs)

Requested reviews:
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/152577

Fixed bug #1152834 (bug in computing the scripting kind of array and object 
constructor exprs)
-- 
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/152577
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2013-03-07 23:46:18 +0000
+++ ChangeLog	2013-03-10 08:04:24 +0000
@@ -45,6 +45,8 @@
   * Fixed bug #1099648 and #1088886 (XML parsing failures on Red Hat)
   * Fixed bug #1099535 (xml:parse endless loop)
   * Fixed bug #866958 (Parsing error not explicit enough)
+  * Fixed bug #1152834 (bug in computing the scripting kind of array and object
+    constructor exprs)
   * Fixed bug #1125444 (input group-by exprs were not treated by index-flwor_vars()
     functoin, leading to erroneous loop hoisting).
   * Fixed bug #867068 (Incorrect usage of XQDY0027)

=== modified file 'src/compiler/expression/json_exprs.cpp'
--- src/compiler/expression/json_exprs.cpp	2013-02-07 17:24:36 +0000
+++ src/compiler/expression/json_exprs.cpp	2013-03-10 08:04:24 +0000
@@ -52,7 +52,10 @@
 
     theScriptingKind = theContentExpr->get_scripting_detail();
 
-    theScriptingKind &= ~VACUOUS_EXPR;
+    if (theScriptingKind == VACUOUS_EXPR)
+      theScriptingKind = SIMPLE_EXPR;
+    else
+      theScriptingKind &= ~VACUOUS_EXPR;
   }
   else
   {
@@ -92,7 +95,10 @@
 
     theScriptingKind = theContentExpr->get_scripting_detail();
 
-    theScriptingKind &= ~VACUOUS_EXPR;
+    if (theScriptingKind == VACUOUS_EXPR)
+      theScriptingKind = SIMPLE_EXPR;
+    else
+      theScriptingKind &= ~VACUOUS_EXPR;
   }
   else
   {

=== added file 'test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_30.xml.res'
--- test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_30.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/jsoniq/arr_constr_30.xml.res	2013-03-10 08:04:24 +0000
@@ -0,0 +1,1 @@
+[ ]

=== added file 'test/rbkt/Queries/zorba/jsoniq/arr_constr_30.xq'
--- test/rbkt/Queries/zorba/jsoniq/arr_constr_30.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/jsoniq/arr_constr_30.xq	2013-03-10 08:04:24 +0000
@@ -0,0 +1,5 @@
+
+declare function local:foo($x) {$x};
+
+local:foo([{}])
+

-- 
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