Commits

Doug Gregor committed 9369c4eb78f
SpriteKit overlay: remove the subscript from SKNode In iOS 8.0/OS X 10.10, SpriteKit introduced an -objectForKeyedSubscript: method that enabled subscripting in Objective-C. However, this subscript wasn't generally useful in Swift because it took AnyObject and produced AnyObject, so the SpriteKit overlay defined a subscript that took a String and produced an [SKNode]. Subsequently, in iOS 9.0/OS X 10.10, -objectForKeyedSubscript: got type annotations that gave it the appropriate Swift signature, which made the subscript defined in the overlay redundant. The twisty logic of the Clang importer would suppress the imported subscript when it saw the one in the overlay, hiding the redundancy. My cleanup of that logic in 0c0a0fab4b8c2a824882fd1dd68379f94a878055 caused uses of the subscript to be redundant. Removal of the redundant code in the overlay is the overall best answer, because it minimizes the size of the overlay and leaves the API in the Objective-C header. However, this will introduce a regression for SpriteKit applications targeting iOS 7.0/OS X 10.8, where the overlay was compensating for the lack of this operation before iOS 8.0 / OS X 10.8. There are workarounds here we can investigate, although they're fairly hacky.