|
|
@@ -40,7 +40,7 @@ var setIsSubsetHelper = function setIsSubsetHelper(lhs, rhs){
|
|
|
|
|
|
var rkeys = Object.keys(rhs);
|
|
|
|
|
|
- // do not shortcircuit when lhs.size() > rhs.size()
|
|
|
+ // do not short-circuit when lhs.size() > rhs.size()
|
|
|
// because lhs can have redundant entries
|
|
|
for (var i = 0; i < lhs.length; i++){
|
|
|
if (rkeys.indexOf(JSON.stringify(lhs[i])) < 0) {
|
|
|
@@ -60,8 +60,8 @@ proto.evaluateInternal = function evaluateInternal(vars) {
|
|
|
var lhs = this.operands[0].evaluateInternal(vars),
|
|
|
rhs = this.operands[1].evaluateInternal(vars);
|
|
|
|
|
|
- if (!(lhs instanceof Array)) throw new Error("Both operands of " + this.getOpName() + ": must be arrays. First argument is of type " + typeof lhs);
|
|
|
- if (!(rhs instanceof Array)) throw new Error("Both operands of " + this.getOpName() + ": must be arrays. First argument is of type " + typeof rhs);
|
|
|
+ if (!(lhs instanceof Array)) throw new Error("Both operands of " + this.getOpName() + ": must be arrays. First argument is of type " + typeof lhs+"; code 17046");
|
|
|
+ if (!(rhs instanceof Array)) throw new Error("Both operands of " + this.getOpName() + ": must be arrays. First argument is of type " + typeof rhs+"; code 17042");
|
|
|
|
|
|
return setIsSubsetHelper(lhs, Helpers.arrayToSet(rhs));
|
|
|
|
|
|
@@ -81,7 +81,7 @@ Optimized.prototype = Object.create(SetIsSubsetExpression.prototype, {
|
|
|
});
|
|
|
|
|
|
Optimized.prototype.evaluateInternal = function evaluateInternal(vars){
|
|
|
- lhs = this.operands[0].evaluateInternal(vars);
|
|
|
+ var lhs = this.operands[0].evaluateInternal(vars);
|
|
|
|
|
|
if (!(lhs instanceof Array)) throw new Error("uassert 17310: both operands of " + this.getOpName() + " must be arrays. First argument is of type " + typeof lhs);
|
|
|
|