[X2Go-Commits] [pale-moon] 225/294: Report bad-class-member errors using a specified offset instead of a node's offset.
git-admin at x2go.org
git-admin at x2go.org
Sat Apr 27 08:58:20 CEST 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch upstream/28.5.0
in repository pale-moon.
commit f5c293d3e82581740558c79cf752bccc0420199c
Author: wolfbeast <mcwerewolf at wolfbeast.com>
Date: Sat Apr 6 07:30:00 2019 +0200
Report bad-class-member errors using a specified offset instead of a node's offset.
---
js/src/frontend/Parser.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp
index 0099ed1..2702f30 100644
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -6673,7 +6673,7 @@ Parser<ParseHandler>::classDefinition(YieldHandling yieldHandling,
propType != PropertyType::AsyncMethod &&
propType != PropertyType::Constructor && propType != PropertyType::DerivedConstructor)
{
- error(JSMSG_BAD_METHOD_DEF);
+ errorAt(nameOffset, JSMSG_BAD_METHOD_DEF);
return null();
}
@@ -6683,17 +6683,17 @@ Parser<ParseHandler>::classDefinition(YieldHandling yieldHandling,
propType = PropertyType::SetterNoExpressionClosure;
if (!isStatic && propAtom == context->names().constructor) {
if (propType != PropertyType::Method) {
- reportWithNode(ParseError, false, propName, JSMSG_BAD_METHOD_DEF);
+ errorAt(nameOffset, JSMSG_BAD_METHOD_DEF);
return null();
}
if (seenConstructor) {
- reportWithNode(ParseError, false, propName, JSMSG_DUPLICATE_PROPERTY, "constructor");
+ errorAt(nameOffset, JSMSG_DUPLICATE_PROPERTY, "constructor");
return null();
}
seenConstructor = true;
propType = hasHeritage ? PropertyType::DerivedConstructor : PropertyType::Constructor;
} else if (isStatic && propAtom == context->names().prototype) {
- reportWithNode(ParseError, false, propName, JSMSG_BAD_METHOD_DEF);
+ errorAt(nameOffset, JSMSG_BAD_METHOD_DEF);
return null();
}
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pale-moon.git
More information about the x2go-commits
mailing list