Chromium Code Reviews| Index: runtime/vm/parser.cc |
| =================================================================== |
| --- runtime/vm/parser.cc (revision 348) |
| +++ runtime/vm/parser.cc (working copy) |
| @@ -1074,7 +1074,7 @@ |
| Function& implicit_closure_function = |
| Function::ZoneHandle(func.ImplicitClosureFunction()); |
| ASSERT(!implicit_closure_function.IsNull()); |
| - ASSERT(implicit_closure_function.is_static()); // TODO(regis): For now. |
| + ASSERT(func.is_static() == implicit_closure_function.is_static()); |
| AstNode* node; |
| if (receiver == NULL) { |
| ASSERT(func.is_static()); |
| @@ -1420,7 +1420,8 @@ |
| // The first parameter of a factory is the TypeArguments vector of the type |
| // of the instance to be allocated. We name this hidden parameter 'this'. |
| const bool has_receiver = |
| - !func.is_static() || func.IsConstructor() || func.IsFactory(); |
| + !func.IsClosureFunction() && |
|
siva
2011/10/11 21:00:46
Maybe we should append to the comment as to why
fu
regis
2011/10/11 23:40:19
I added a comment.
I prefer that is_static() refle
|
| + (!func.is_static() || func.IsConstructor() || func.IsFactory()); |
| const bool are_implicitly_final = func.is_const() && func.IsConstructor(); |
| const bool allow_explicit_default_values = true; |
| ASSERT(CurrentToken() == Token::kLPAREN); |