Skip to content

Commit

Permalink
Remove unnecessary call to [self descriptor] in resolveClassMethod:
Browse files Browse the repository at this point in the history
This was causing problems in OCMock due to recursion when OCMock was trying
to mock a protobuf.

`_forwardStackInvocation:` was being called as part of the resolution of `descriptor`.
  • Loading branch information
dmaclach authored and thomasvl committed May 11, 2020
1 parent 0611563 commit 118589c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion objectivec/GPBMessage.m
Original file line number Diff line number Diff line change
Expand Up @@ -3253,7 +3253,7 @@ + (BOOL)resolveInstanceMethod:(SEL)sel {

+ (BOOL)resolveClassMethod:(SEL)sel {
// Extensions scoped to a Message and looked up via class methods.
if (GPBResolveExtensionClassMethod([self descriptor].messageClass, sel)) {
if (GPBResolveExtensionClassMethod(self, sel)) {
return YES;
}
return [super resolveClassMethod:sel];
Expand Down

0 comments on commit 118589c

Please sign in to comment.