Skip to content

Commit

Permalink
[ObjC] Update internal validations
Browse files Browse the repository at this point in the history
Update some of the asserts now that older formats aren't expected.

PiperOrigin-RevId: 684834590
  • Loading branch information
thomasvl authored and copybara-github committed Oct 11, 2024
1 parent 0bfe41b commit b751b81
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions objectivec/GPBDescriptor.m
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit b751b81

Please sign in to comment.