I have a nested type nested in a structure I want to remove from my project, but I want to keep the nested type, nested elsewhere. This is a close approximation of what my code looks like:
struct OldType {
@available(*, deprecated, renamed: "NewType.MyNestedType")
typealias MyNestedType = UInt8
}
struct NewType {
typealias MyNestedType = UInt8
}
The problem is that in existing instances of using OldType.MyNestedType, the fixit tries replacing only the trailing dot syntax, not the whole type, which results in OldType.NewType.MyNestedType, which is obviously wrong.
Is there a way to redirect the whole Typed path and not just the last component?