Index: runtime/vm/ast.h |
diff --git a/runtime/vm/ast.h b/runtime/vm/ast.h |
index 48b4a225d14b4f342a2998ab2422a700a5a43cab..790e94ccfb7bacfa7eb809b692d0be3392f8446f 100644 |
--- a/runtime/vm/ast.h |
+++ b/runtime/vm/ast.h |
@@ -540,16 +540,15 @@ class ClosureNode : public AstNode { |
ClosureNode(TokenPosition token_pos, |
const Function& function, |
AstNode* receiver, // Non-null for implicit instance closures. |
- LocalScope* scope) // Null for implicit closures or functions |
- // that already have a ContextScope because |
- // they were compiled before. |
+ LocalScope* scope) // Null for implicit closures. |
: AstNode(token_pos), |
function_(function), |
receiver_(receiver), |
scope_(scope), |
is_deferred_reference_(false) { |
ASSERT(function_.IsZoneHandle()); |
- ASSERT((function_.IsNonImplicitClosureFunction() && (receiver_ == NULL)) || |
+ ASSERT((function_.IsNonImplicitClosureFunction() && |
+ (receiver_ == NULL) && (scope_ != NULL)) || |
(function_.IsImplicitInstanceClosureFunction() && |
(receiver_ != NULL) && (scope_ == NULL)) || |
(function_.IsImplicitStaticClosureFunction() && |