|
|
@@ -15,7 +15,7 @@ var SetEqualsExpression = module.exports = function SetEqualsExpression() {
|
|
|
this.nargs = 2;
|
|
|
|
|
|
base.call(this);
|
|
|
-}, klass = SetEqualsExpression, base = require("./NaryBaseExpressionT")(SetEqualsExpression), proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
|
|
|
+}, klass = SetEqualsExpression, base = require("./VariadicExpressionT")(SetEqualsExpression), proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
|
|
|
|
|
|
// DEPENDENCIES
|
|
|
var Value = require("../Value"),
|
|
|
@@ -28,7 +28,7 @@ proto.getOpName = function getOpName() {
|
|
|
};
|
|
|
|
|
|
proto.validateArguments = function validateArguments(args) {
|
|
|
- if (args.length < 2) throw new Error("Two or more arguments requird. Got " + arguments.length);
|
|
|
+ if (args.length < 2) throw new Error("Two or more arguments required. Got " + arguments.length+"; code 17045");
|
|
|
};
|
|
|
/**
|
|
|
* Takes arrays. Returns true if the arrays have the same values (after duplicates are removed). Returns false otherwise.
|
|
|
@@ -41,7 +41,7 @@ proto.evaluateInternal = function evaluateInternal(vars) {
|
|
|
for (var i = 0; i < n; i++){
|
|
|
var nextEntry = this.operands[i].evaluateInternal(vars);
|
|
|
|
|
|
- if(!(nextEntry instanceof Array)) throw new Error("All operands of " + this.getOpName() +" must be arrays. One argument is of type: " + typeof nextEntry);
|
|
|
+ if(!(nextEntry instanceof Array)) throw new Error("All operands of " + this.getOpName() +" must be arrays. One argument is of type: " + typeof nextEntry+"; code 17044");
|
|
|
|
|
|
if(i == 0){
|
|
|
lhs = Helpers.arrayToSet(nextEntry);
|