title: Kotlin extension function failed to compile in java
body: <p>I've defined the following extension function</p>
  <pre><code>fun &lt;T&gt; T.showAppPresentation(
      appPresentable: Maybe&lt;AppPresentable&gt;,
      appPresentationView: AppPresentationView,
      closeListener: () -&gt; Unit
  ) where T : Fragment, T : FragmentPresentable {
      TODO()
  }
  </code></pre>
  <p>where <code>Fragment</code> is an android <code>Fragment</code> and <code>FragmentPresentable</code> is an interface. It shows no error in Android Studio. When I try to compile my code, I got the following errors:</p>
  <pre><code>FragmentPresentableExtensionsKt.java:12: error: &lt;identifier&gt; expected
      public static final &lt;T extends androidx.fragment.app.Fragment &amp; FragmentPresentable&gt;void showAppPresentation(@org.jetbrains.annotations.NotNull()
                                                                      ^
  FragmentPresentableExtensionsKt.java:12: error: illegal start of type
      public static final &lt;T extends androidx.fragment.app.Fragment &amp; FragmentPresentable&gt;void showAppPresentation(@org.jetbrains.annotations.NotNull()
                                                                                        ^
  FragmentPresentableExtensionsKt.java:12: error: '(' expected
      public static final &lt;T extends androidx.fragment.app.Fragment &amp; FragmentPresentable&gt;void showAppPresentation(@org.jetbrains.annotations.NotNull()
                                                                                         ^
  </code></pre>
  <p>What am I missing?</p>