Index: runtime/vm/parser.cc |
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc |
index 1afacf5b0017cb5c7c053202c0a0c4ff1e2e99f6..bb5f8d61bbfea7b6404fd9a8a8513f5ed7a3e3c9 100644 |
--- a/runtime/vm/parser.cc |
+++ b/runtime/vm/parser.cc |
@@ -4707,7 +4707,7 @@ void Parser::ParseClassDeclaration(const GrowableObjectArray& pending_classes, |
} else { |
// Not patching a class, but it has been found. This must be one of the |
// pre-registered classes from object.cc or a duplicate definition. |
- if (!(cls.is_prefinalized() || |
+ if (!(cls.is_prefinalized() || cls.IsClosureClass() || |
RawObject::IsImplicitFieldClassId(cls.id()))) { |
ReportError(classname_pos, "class '%s' is already defined", |
class_name.ToCString()); |