title: How to avoid type mismatch error with kotlin generic?
body: <h3>Code snippet</h3>
  
  <pre><code>fun main() {
      val myClass : AbsClass&lt;Any&gt; = MyClass()
      // Error - type mismatch
  
      val myClass : AbsClass&lt;*&gt; = MyClass() 
      // Not Error, but parameter of 'foo' is 'Nothing'
  
      val myClass : AbsClass&lt;Any&gt; = MyClass() as AbsClass&lt;Any&gt; 
      // It's correct works with unchecked cast warning and unnecessary casting code.
  
      myClass.foo(MyModel())
  }
  
  class MyClass() : AbsClass&lt;MyModel&gt;() {
  }
  
  abstract class AbsClass&lt;T&gt; {
      fun foo(value:T){}
  }
  
  data class MyModel(val number:Int = 0)
  </code></pre>
  
  <h3>Question</h3>
  
  <p>I want writing code as <code>val myClass : AbsClass&lt;Any&gt; = MyClass()</code> but, it shows type mismatch error. How to solve this problem(avoid type casting code<code>as AbsClass&lt;Any&gt;</code>)?</p>