Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: src/preparser.h

Issue 982153003: [parser] better error message for generator constructors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added message tests Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/messages.js ('k') | test/message/class-constructor-accessor.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 4a35cd59f52dfa71426abc71f58937ce3d783f86..7df271f6baad4152aa359f3377e6d5609b97bbe6 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -3106,7 +3106,9 @@ void ParserBase<Traits>::ClassLiteralChecker::CheckProperty(
}
} else if (IsConstructor()) {
if (is_generator || type == kAccessorProperty) {
- this->parser()->ReportMessage("constructor_special_method");
+ const char* msg =
+ is_generator ? "constructor_is_generator" : "constructor_is_accessor";
+ this->parser()->ReportMessage(msg);
*ok = false;
return;
}
« no previous file with comments | « src/messages.js ('k') | test/message/class-constructor-accessor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698