title: Deprecating a Nested Type in Favor of a Different Nested Type
body: <p>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:</p>
  
  <pre class="lang-swift prettyprint-override"><code>struct OldType {
      @available(*, deprecated, renamed: "NewType.MyNestedType")
      typealias MyNestedType = UInt8
  }
  
  struct NewType {
      typealias MyNestedType = UInt8
  }
  </code></pre>
  
  <p>The problem is that in existing instances of using <code>OldType.MyNestedType</code>, the fixit tries replacing only the trailing dot syntax, not the whole type, which results in <code>OldType.NewType.MyNestedType</code>, which is obviously wrong.</p>
  
  <p>Is there a way to redirect the whole Typed path and not just the last component?</p>