summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-04-06 10:37:12 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-04-06 10:37:12 +0200
commitd60cfce5e4b2e7ecf344b86c1bd4a712490a8c52 (patch)
treea883919bf4c7a20f3640b975f4deb589a17952da
parent51e2758e02a6187228e35f58bfa0e1752870476b (diff)
downloaduxp-d60cfce5e4b2e7ecf344b86c1bd4a712490a8c52.tar.gz
Report the error for uninitialized const-declaration in for(;;) loop
head using an explicit offset.
-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 9f9169950a..fe30328de3 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();
}
}