title: Extension functions on annotated types
body: <p>Is it possible to define a Kotlin extension function on a annotated type like this?</p>
  
  <pre><code>@ColorInt
  fun @ColorInt Int.darken(): Int {
      return ColorUtils.blendARGB(this, Color.BLACK, 0.2f)
  }
  </code></pre>
  
  <p>Alternative form:</p>
  
  <pre><code>@ColorInt
  fun (@ColorInt Int).darken(): Int {
      return ColorUtils.blendARGB(this, Color.BLACK, 0.2f)
  }
  </code></pre>
  
  <p>That would correspond to the following static funtion:</p>
  
  <pre><code>@ColorInt
  fun darken(@ColorInt color: Int): Int {
      return ColorUtils.blendARGB(color, Color.BLACK, 0.2f)
  }
  </code></pre>
  
  <p>I don't think that's possible yet using Kotlin, but would it be possible to add that feature in later Kotlin versions?</p>
  
  <p>On a side note:
  The same question applies to <code>@IntDef</code>, <code>@StringDef</code>, <code>@[resource type]Res</code> as well.</p>