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

Unified Diff: runtime/vm/parser.cc

Issue 11194033: Enable constructor name check by default (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 | « no previous file | tests/co19/co19-runtime.status » ('j') | tests/language/named_constructor_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 13746)
+++ runtime/vm/parser.cc (working copy)
@@ -22,8 +22,6 @@
namespace dart {
-DEFINE_FLAG(bool, constructor_name_check, false,
- "Named constructors may not clash with other members");
DEFINE_FLAG(bool, enable_asserts, false, "Enable assert statements.");
DEFINE_FLAG(bool, enable_type_checks, false, "Enable type checks.");
DEFINE_FLAG(bool, trace_parser, false, "Trace parser operations.");
@@ -3248,7 +3246,8 @@
for (int i = 0; i < members.length(); i++) {
MemberDesc* member = &members[i];
- if (FLAG_constructor_name_check && member->constructor_name != NULL) {
+ if (member->constructor_name != NULL) {
+ // Check whether constructor name conflicts with a member name.
if (class_desc->FunctionNameExists(
*member->constructor_name, member->kind)) {
ErrorMsg(member->name_pos,
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | tests/language/named_constructor_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698