Subclass overridden method is not called with WMO enabled and Testability disabled
Originator: | vixentael | ||
Number: | rdar://25412647 | Date Originated: | 29-03-2016 |
Status: | Closed | Resolved: | Patched |
Product: | Developer tools | Product Version: | xcode 7.3 (7D175), any iOS version |
Classification: | Reproducible: | Always |
Summary: Child's overriddenMethod is never called. In case if you will compile a code with "Swift Compiler Whole Module Optimization Enabled = YES" and "Testability" = NO. Steps to Reproduce: 1. Enable "Swift Compiler Whole Module Optimization", 2. Disable "Testability", 3. Build, 4. Run Expected Results: Child method should be called Actual Results: Child method isn't called, but parent method does. Version: sample code: https://gist.github.com/PaulTaykalo/5c97010874a93626ca3c sample project: https://dl.dropboxusercontent.com/u/11487658/test_wmo.zip Notes: Configuration: xcode 7.3 (7D175), any iOS version Attachments: 'test_wmo.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!
Patched for Swift 2.2.1
https://github.com/apple/swift/pull/1954
https://github.com/apple/swift/pull/1923