summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-04-06 10:47:27 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-04-06 10:47:27 +0200
commitf4fec66e094281465ce1d143e00b0c9bda4863af (patch)
tree42634f9feddaf4b7672f2a7febaa6cc65dad11f8 /js
parentb579e0567c887743d24c2745065b71bb06fea4f8 (diff)
downloaduxp-f4fec66e094281465ce1d143e00b0c9bda4863af.tar.gz
Specify an explicit offset when reporting an error for a for-of loop
whose target is an expression that begins with 'let'.
Diffstat (limited to 'js')
-rw-r--r--js/src/frontend/Parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp
index 3a5b5d6d7c..3f793ffcfe 100644
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -5536,7 +5536,7 @@ Parser<ParseHandler>::forHeadStart(YieldHandling yieldHandling,
//
// See ES6 13.7.
if (isForOf && letIsIdentifier) {
- reportWithNode(ParseError, false, *forInitialPart, JSMSG_LET_STARTING_FOROF_LHS);
+ errorAt(exprOffset, JSMSG_LET_STARTING_FOROF_LHS);
return false;
}