Extensions in Frameworks do not support subscripts properly

Originator:christian.noon
Number:rdar://18256262 Date Originated:9/6/14 09:28 AM
Status:Closed Resolved:9/19/14 09:02 AM
Product:Developer Tools Product Version:iOS 8 Beta 5
Classification:Serious Bug Reproducible:Yes
 
Summary:
When I create a Swift String subscript extension and the Swift file lives in the App Target, the subscript extension works nicely. However, when I move it into a Framework, the same logic no longer works. I have created a sample application with two test cases that demonstrates the issue.

I have been able to do this with Swift String function extensions successfully. It seems to be something specific to the subscript extension.

Steps to Reproduce:
1. Open the SubscriptFrameworkExtensions sample app
2. Run it with Test Case 1 uncommented
3. Run it with Test Case 2 uncommented

You will see the difference in output.

Expected Results:
I would expect both approaches to work the same way.

Actual Results:
The results are different. The framework extension method just doesn't work at all.

Version:
iOS 8, Beta 5

Notes:


Configuration:
iOS Simulator, Xcode Beta 7

Attachments:
'SubscriptFrameworkExtensions.zip' was successfully uploaded.

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!