summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/Parser.cpp
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/src/frontend/Parser.cpp
parentb579e0567c887743d24c2745065b71bb06fea4f8 (diff)
downloadUXP-f4fec66e094281465ce1d143e00b0c9bda4863af.tar
UXP-f4fec66e094281465ce1d143e00b0c9bda4863af.tar.gz
UXP-f4fec66e094281465ce1d143e00b0c9bda4863af.tar.lz
UXP-f4fec66e094281465ce1d143e00b0c9bda4863af.tar.xz
UXP-f4fec66e094281465ce1d143e00b0c9bda4863af.zip
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/src/frontend/Parser.cpp')
-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 3a5b5d6d7..3f793ffcf 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;
}