Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v11.1 Broke array.map #15

Closed
oztune opened this issue Jan 16, 2015 · 3 comments
Closed

v11.1 Broke array.map #15

oztune opened this issue Jan 16, 2015 · 3 comments

Comments

@oztune
Copy link

oztune commented Jan 16, 2015

This change is causing a crash for me since I updated to 11.1

11...11.1#diff-4bbdff7cda9b63e25e2e8865533250d4L31

Error:

method only defined for abstract class.  Define -[__NSCFArray initWithCapacity:]!

When subclassing or extending NS class clusters like NSArray we need to be extra careful about what assumptions the code makes (https://mikeash.com/pyblog/friday-qa-2010-03-12-subclassing-class-clusters.html).

This is a pretty serious issue so I'm reverting to 11.0 for now.

@mxcl mxcl closed this as completed in 21db084 Jan 30, 2015
@mxcl
Copy link
Owner

mxcl commented Jan 30, 2015

Sorry for the delay.

FYI in future this would be fixed if you did a -[ copy] first. It happens because NSArray is a class cluster and some of the reimplementations don't support typical constructors and it's hard to test for that.

Really I should never have accepted the fmap patch but at the time it seemed prudent.

@oztune
Copy link
Author

oztune commented Feb 1, 2015

Thanks! I believe map for NSDictionary and NSSet also made the same assumptions though.

@mxcl
Copy link
Owner

mxcl commented Feb 2, 2015

Fixed those too thanks.

mxcl added a commit that referenced this issue Feb 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants