-[NSPredicate evaluateWithObject:] throws a runtime exception when evaluating subqueries on custom NSFastEnumeration-compliant types

Originator:jp
Number:rdar://31252694 Date Originated:24-Mar-2017 4:11 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:All
Classification:Other Bug Reproducible:Always
 
Area:
Foundation

Summary:
See https://github.com/realm/realm-cocoa/pull/4770 and https://twitter.com/0xced/status/845195517533437953 for detailed explanations of the problem, workarounds and further discussion.

Steps to Reproduce:
Run the unit tests added in https://github.com/realm/realm-cocoa/pull/4770 without the workaround(s) that were also added in that PR.

Expected Results:
`-[NSPredicate evaluateWithObject:]` should succeed.

Actual Results:
`-[NSPredicate evaluateWithObject:]` fails with a runtime exception.

Version:
All versions of Foundation on all platforms appear to be affected.

Notes:


Configuration:
All versions of Foundation on all platforms appear to be affected.

Attachments:
None

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!