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

Unified Diff: runtime/vm/parser.cc

Issue 2153453002: Remove now redundant check after an earlier cl added a tighter check. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 6c0bd7df21a00ac562e3cb86218b3022b1bb842c..0af87671be370026a6a1c18eee55e597e8b9011d 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -3387,17 +3387,6 @@ SequenceNode* Parser::ParseFunc(const Function& func, bool check_semicolon) {
ASSERT(AbstractType::Handle(Z, func.result_type()).IsResolved());
ASSERT(func.NumParameters() == params.parameters->length());
- // Check whether the function has any field initializer formal parameters,
- // which are not allowed in non-constructor functions.
- if (params.has_field_initializer) {
- for (int i = 0; i < params.parameters->length(); i++) {
- ParamDesc& param = (*params.parameters)[i];
- if (param.is_field_initializer) {
- ReportError(param.name_pos,
- "field initializer only allowed in constructors");
- }
- }
- }
// Populate function scope with the formal parameters.
AddFormalParamsToScope(&params, current_block_->scope);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698