diff --git a/objectivec/GPBDescriptor.m b/objectivec/GPBDescriptor.m index 775083710532e..92ff98b65452a 100644 --- a/objectivec/GPBDescriptor.m +++ b/objectivec/GPBDescriptor.m @@ -107,10 +107,8 @@ + (instancetype)allocDescriptorForClass:(Class)messageClass NSAssert((flags & GPBDescriptorInitializationFlag_ClosedEnumSupportKnown) != 0, @"Internal error: close enum should be known"); - // `messageName` and `fileDescription` should both be set or both be unset depending on if this is - // being called from current code generation or legacy code generation. - NSAssert((messageName == nil) == (fileDescription == NULL), - @"name and fileDescription should always be provided together"); + NSAssert((messageName != nil), @"Internal error: missing messageName"); + NSAssert((fileDescription != NULL), @"Internal error: missing fileDescription"); #endif NSMutableArray *fields =