From 0917a6a5b17e5024fccb64785bd71f69dadcc721 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 13 Nov 2014 13:42:18 +1100 Subject: [PATCH] better destructuring AssignmentExpression error message --- lib/6to5/transformation/transformers/destructuring.js | 2 +- .../destructuring/assignment-expression/options.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/6to5/transformation/transformers/destructuring.js b/lib/6to5/transformation/transformers/destructuring.js index a1fb9627df..bdb695d2b3 100644 --- a/lib/6to5/transformation/transformers/destructuring.js +++ b/lib/6to5/transformation/transformers/destructuring.js @@ -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) { diff --git a/test/fixtures/transformation/destructuring/assignment-expression/options.json b/test/fixtures/transformation/destructuring/assignment-expression/options.json index d0680c1c5d..56380df8e7 100644 --- a/test/fixtures/transformation/destructuring/assignment-expression/options.json +++ b/test/fixtures/transformation/destructuring/assignment-expression/options.json @@ -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" }