title: How do I suppress this deprecated warning on a typealias in Kotlin with Android Studio?
body: <p>Say I have this snippet in a kotlin file:</p>
  <pre class="lang-kotlin prettyprint-override"><code>typealias GoodThing = Bad.Thing
  fun thing(): Bad.Thing = GoodThing
  
  @Deprecated(&quot;Deprecated&quot;)
  sealed class Bad {
  
      @Deprecated(&quot;Deprecated&quot;)
      object Thing: Bad()
  }
  </code></pre>
  <p>In Android Studio Arctic Fox, I get a deprecated warning on <code>GoodThing</code> in this line:</p>
  <pre class="lang-kotlin prettyprint-override"><code>fun thing(): Bad.Thing = GoodThing
  </code></pre>
  <p>Which reads:
  <code>typealias GoodThing = Bad.Thing' uses 'Thing', which is deprecated</code></p>
  <p>I want to suppress this warning.  But I can't seem to figure out how.  I have tried this, but it didn't work:</p>
  <pre class="lang-kotlin prettyprint-override"><code>@Suppress(&quot;DEPRECATION&quot;)
  typealias GoodThing = Bad.Thing
  
  @Suppress(&quot;DEPRECATION&quot;)
  fun thing(): Bad.Thing = GoodThing
  </code></pre>
  <p>What can I do to suppress this warning?</p>
  <p><strong>NOTE:</strong> Please  Assume I do not have access to modify <code>sealed class Bad</code>.  So setting <code>DeprecationLevel.HIDDEN</code> on <code>object Thing</code> is not possible.</p>
  <p>Also I know this snippet looks odd, but I'm not interested in discussing the &quot;why&quot; of this code snippet.  I am simply asking if there is a way to suppress the warning in the snippet.  And if it is not possible, is that a bug in Android Studio?  Or is that expected behavior?</p>