<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello all,<div class=""><br class=""></div><div style="orphans: 2; widows: 2;" class=""><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0057-importing-objc-generics.md" class="">SE-0057</a> describes a method for bridging generics in to Objective-C which opt into type discovery by implementing -<span style="font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(36, 41, 46); orphans: 2; widows: 2;" class="">classForGenericArgumentAtIndex </span><span style="orphans: 2; widows: 2;" class=""><font color="#24292e" class="">or </font><font face="Menlo" style="color: rgb(36, 41, 46);" class="">+classForGenericArgumentAtIndex</font><font color="#24292e" class="">, 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.” </font></span></div><div style="orphans: 2; widows: 2;" class=""><br class=""></div><div style="orphans: 2; widows: 2;" class=""><font color="#24292e" class="">I searched the Swift bug tracker, and didn’t find anything about it. Will this feature be added in a future version of Swift? </font></div><div style="orphans: 2; widows: 2;" class=""><font color="#24292e" class=""><br class=""></font></div><div style="orphans: 2; widows: 2;" class=""><font color="#24292e" class="">Ben Pious</font></div></body></html>