Index: runtime/vm/parser.cc |
=================================================================== |
--- runtime/vm/parser.cc (revision 26668) |
+++ runtime/vm/parser.cc (working copy) |
@@ -1410,6 +1410,11 @@ |
params->has_field_initializer = true; |
} |
+ if (params->has_optional_named_parameters && |
+ (parameter.name->CharAt(0) == '_')) { |
+ ErrorMsg(parameter.name_pos, "named parameter must not be private"); |
+ } |
+ |
// Check for duplicate formal parameters. |
const intptr_t num_existing_parameters = |
params->num_fixed_parameters + params->num_optional_parameters; |