Hello all,

SE-0057 
<https://github.com/apple/swift-evolution/blob/master/proposals/0057-importing-objc-generics.md>
 describes a method for bridging generics in to Objective-C which opt into type 
discovery by implementing -classForGenericArgumentAtIndex or 
+classForGenericArgumentAtIndex, and gives a number of examples using GameKit. 
However, the examples in SE-0057 don’t actually work in Swift 3. I can’t get 
the examples to work with the GameKit classes (which actually do implement 
those two methods in the iOS 10 SDK) or with my own Objective-C classes; they 
both fail with “Extension of a generic Objective-C class cannot access the 
class’s generic parameters at runtime.” 

I searched the Swift bug tracker, and didn’t find anything about it. Will this 
feature be added in a future version of Swift? 

Ben Pious

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Reply via email to