title: Handling multiple experimental annotations throughout an app
body: <p>I have an app that makes heavy use of experimental features for Jetpack Compose so I have to declare a bunch of annotations on the composables. Since these annotations require callers to also declare them I have ended up in a situation where I have an activity with the following code:</p>
  <pre class="lang-kotlin prettyprint-override"><code>import androidx.appcompat.app.AppCompatActivity
  
  import androidx.compose.material.ExperimentalMaterialApi
  import androidx.compose.ui.ExperimentalComposeUiApi
  
  import com.google.accompanist.navigation.material.ExperimentalMaterialNavigationApi
  import com.google.accompanist.pager.ExperimentalPagerApi
  import com.google.accompanist.permissions.ExperimentalPermissionsApi
  …
  
  class MainActivity : AppCompatActivity() {
  
      @ExperimentalPermissionsApi
      @ExperimentalComposeUiApi
      @ExperimentalPagerApi
      @ExperimentalMaterialNavigationApi
      @ExperimentalMaterialApi
      override fun onCreate(savedInstanceState: Bundle?) {
          // … wiring up compose code (which propagates the experimental annotations)
  </code></pre>
  <p>An alternative to avoid this situation would be to use the <code>@OptIn</code> instead but since only one is allowed per declaration it doesn't work out for my case with multiple experimental features.</p>
  <p>Any way… This works fine — In Kotlin 1.5.</p>
  <p>With Kotlin 1.6 I am getting a compilation error:</p>
  <blockquote>
  <p>Opt-in requirement marker annotation on override requires the same marker on base declaration</p>
  </blockquote>
  <p>But the base declaration is in the standard API that I cannot change.
  <strong>How can I make this compile (and work as before)?</strong></p>