Fix for issue 836
This was an issue with variable scope from AQL.jj
The scope of a create function was being left as the parent scope of the next statement
This bug was on "create" only, not "declare"
I changed create to do a pop on the scope in the same way as declare does
Change-Id: I05869babf54affc661f9bb007e7a9e52f67f0154
Reviewed-on: http://fulliautomatix.ics.uci.edu:8443/196
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Raman Grover <ramang@uci.edu>
diff --git a/asterix-aql/src/main/javacc/AQL.jj b/asterix-aql/src/main/javacc/AQL.jj
index 236beab..826a27b 100644
--- a/asterix-aql/src/main/javacc/AQL.jj
+++ b/asterix-aql/src/main/javacc/AQL.jj
@@ -528,6 +528,7 @@
// TODO use fctName.library
signature = new FunctionSignature(fctName.dataverse, fctName.function, paramList.size());
getCurrentScope().addFunctionDescriptor(signature, false);
+ removeCurrentScope();
return new CreateFunctionStatement(signature, paramList, functionBody, ifNotExists);
}
}