title: Java generics in Kotlin: Use Java raw type as method parameter in Kotlin
body: <p>I'm looking at this class in Facebook sdk:</p>
  
  <pre><code>public final class ShareDialog extends 
                    FacebookDialogBase&lt;ShareContent, Sharer.Result&gt;
  </code></pre>
  
  <p>I want to have a method in Kotlin that accepts it's parent class, similar to the following:</p>
  
  <pre><code>fun shareToFacebook(shareDialog: FacebookDialogBase&lt;ShareContent&lt;*, *&gt;, Sharer.Result&gt;,
                      activity: Activity) 
  </code></pre>
  
  <p>But when I try to call it form java:</p>
  
  <pre><code>tournamentPresenter.shareToFacebook(new ShareDialog(this), this);
  </code></pre>
  
  <p>I get compile time error:</p>
  
  <p><code>Error:(751, 45) error: incompatible types: ShareDialog cannot be converted to FacebookDialogBase&lt;ShareContent&lt;?,?&gt;,Result&gt;</code></p>
  
  <p>P.S. I know that it's better to not give share dialog to the presenter, I'm not going to do it, let's just use it as an example of the problem</p>