Xcode's "renaming" feature doesn't rename uses via typealias
| Originator: | jp | ||
| Number: | rdar://33640726 | Date Originated: | 31-Jul-2017 05:05 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 9 (9M189t) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: When renaming an Objective-C method `-foo` to `-bar` on an Objective-C type `Foo`, and a Swift typealias `SwiftFoo = Foo` exists, uses of `SwiftFoo.foo()` won’t be renamed to `SwiftFoo.bar()`. Steps to Reproduce: In a mixed Objective-C/Swift project with the following source: ```objc @interface Foo - (void)foo; @end @implementation Foo @end ``` ```swift typealias SwiftFoo = Foo SwiftFoo().foo() ``` Rename `- (void)foo;` to `- (void)bar;` using Xcode 9’s refactoring tools. Expected Results: `SwiftFoo().foo()` should be renamed to `SwiftFoo().bar()`. Actual Results: `SwiftFoo().foo()` is not modified at all. Version: Xcode 9 (9M189t) Notes: https://twitter.com/simjp/status/892172893139763200
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!