better destructuring AssignmentExpression error message

This commit is contained in:
Sebastian McKenzie 2014-11-13 13:42:18 +11:00
parent 349eba33ce
commit 0917a6a5b1
2 changed files with 2 additions and 2 deletions

View File

@ -149,7 +149,7 @@ exports.ExpressionStatement = function (node, parent, file, scope) {
exports.AssignmentExpression = function (node, parent, file) {
if (parent.type === "ExpressionStatement") return;
if (!t.isPattern(node.left)) return;
throw file.errorWithNode(node, "AssignmentExpression destructuring outside of a ExpressionStatement is forbidden due to current limitations");
throw file.errorWithNode(node, "AssignmentExpression destructuring outside of a ExpressionStatement is forbidden due to current 6to5 limitations");
};
exports.VariableDeclaration = function (node, parent, file, scope) {

View File

@ -1,3 +1,3 @@
{
"throws": "AssignmentExpression destructuring outside of a ExpressionStatement is forbidden due to current limitations"
"throws": "AssignmentExpression destructuring outside of a ExpressionStatement is forbidden due to current 6to5 limitations"
}