diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-04-06 10:37:12 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-04-06 10:37:12 +0200 |
commit | d60cfce5e4b2e7ecf344b86c1bd4a712490a8c52 (patch) | |
tree | a883919bf4c7a20f3640b975f4deb589a17952da /js/src | |
parent | 51e2758e02a6187228e35f58bfa0e1752870476b (diff) | |
download | UXP-d60cfce5e4b2e7ecf344b86c1bd4a712490a8c52.tar UXP-d60cfce5e4b2e7ecf344b86c1bd4a712490a8c52.tar.gz UXP-d60cfce5e4b2e7ecf344b86c1bd4a712490a8c52.tar.lz UXP-d60cfce5e4b2e7ecf344b86c1bd4a712490a8c52.tar.xz UXP-d60cfce5e4b2e7ecf344b86c1bd4a712490a8c52.zip |
Report the error for uninitialized const-declaration in for(;;) loop
head using an explicit offset.
Diffstat (limited to 'js/src')
-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 9f9169950..fe30328de 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -4577,7 +4577,7 @@ Parser<ParseHandler>::declarationName(Node decl, DeclarationKind declKind, Token // Normal const declarations, and const declarations in for(;;) // heads, must be initialized. if (declKind == DeclarationKind::Const) { - reportWithNode(ParseError, false, binding, JSMSG_BAD_CONST_DECL); + errorAt(namePos.begin, JSMSG_BAD_CONST_DECL); return null(); } } |