SKMutableTexture: superclass initializers don't return a SKMutableTexture

Originator:brandon
Number:rdar://17400234 Date Originated:June 20, 2014
Status:Resolved Resolved:July 23, 2014
Product:OS X SDK Product Version:10.10 (14A261i)
Classification:Bug Reproducible:Always
 
Summary:
SKMutableTexture's description (as read here: https://developer.apple.com/library/prerelease/ios/documentation/SpriteKit/Reference/SKMutableTexture_Ref/index.html) contains the following: "To use this class, create a mutable texture using either one of its creation methods or those of its superclass. " However, whenever I use an SKTexture (i.e. superclass) initialization method in this manner (e.g. `- [SKMutableTexture textureWithRect:inTexture:]`) the returned object is an SKTexture. This seems counter to the documentation quoted above. That those same initialization methods also have the return type "instancetype" makes me believe that this could be incorrect behaviour.

Steps to Reproduce:
1. Create a new OS X > Application > Game project in Xcode
2. Use the SpriteKit game technology
3. Attempt to create an SKMutableTexture using one of the superclass' initializers
`SKMutableTexture *mutableTexture = [SKMutableTexture textureWithImageNamed:@"Spaceship"];`
4. Note that the returned object is actually an SKTexture
```
(lldb) po [mutableTexture class]
SKTexture
```

Expected Results:
I would expect the superclass' initialization methods to return a SKMutableTexture with unique pixel data if necessary.

Actual Results:
The superclass' initialization methods return a SKTexture.

Version:
Xcode Version 6.0 (6A216f)
OS X Version 10.10 (14A261i)

Configuration:
This has occurred for me every time with both OS X 10.10 and iOS 8.0 prerelease SDKs. I have not found a case where this scenario has worked as expected.

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!