You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NSPredicate does not match a bool property if the rhs value is specified in the format string. However if the rhs value is supplied as a param it does work as expected.
For example:
TestObjectB *b = [[TestObjectB alloc] init];
b.flag = YES;
[[NSPredicate predicateWithFormat:@"flag == YES"] evaluateWithObject:b] // Will be false
[[NSPredicate predicateWithFormat:@"flag == %d", YES] evaluateWithObject:d] // Will be true
Another twist is that if you match against a NSDictionary object it works as expected:
NSDictionary *d = @{@"flag" : @(YES)};
[[NSPredicate predicateWithFormat:@"flag == YES"] evaluateWithObject:d]) // Will be true
The text was updated successfully, but these errors were encountered:
@rupertdaniel thank you for filing the issue.
The root cause has been tracked down and it turns out to be, the changes we made to NSNumber isEqual in the new CoreFoundation.
NSPredicate does not match a bool property if the rhs value is specified in the format string. However if the rhs value is supplied as a param it does work as expected.
For example:
Another twist is that if you match against a NSDictionary object it works as expected:
The text was updated successfully, but these errors were encountered: