diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-04-06 10:47:27 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-04-06 10:47:27 +0200 |
commit | f4fec66e094281465ce1d143e00b0c9bda4863af (patch) | |
tree | 42634f9feddaf4b7672f2a7febaa6cc65dad11f8 /js | |
parent | b579e0567c887743d24c2745065b71bb06fea4f8 (diff) | |
download | uxp-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.cpp | 2 |
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; } |