title: Type inference failed. Please try to specify type argument explicity : Kotlin
body: <pre><code>    class SetContentView&lt;in R : Activity, out T : ViewDataBinding&gt;(
       @LayoutRes private val layoutRes: Int) {
       private var value : T? = null
       operator fun getValue(thisRef: Activity, property: KProperty&lt;*&gt;): T {
  
       value = value ?: DataBindingUtil.setContentView&lt;T&gt;(thisRef, layoutRes)
       return value
       }
      }
  
      val binding: ActivityDogBinding by contentView(R.layout.activity_dog)
  </code></pre>
  
  <p>DogActivity.kt</p>
  
  <pre><code>    fun &lt;R : Activity, T : ViewDataBinding&gt; contentView(@LayoutRes layoutRes: Int):
       SetContentView&lt;R, T&gt; {
       return SetContentView(layoutRes)
      }
  </code></pre>
  
  <p>When I try to call in the activity as </p>
  
  <pre><code>val binding: ActivityLoginBinding by contentView(layoutRes = R.layout.activity_login)
  </code></pre>
  
  <p>Its throwing error as</p>
  
  <blockquote>
    <p>Type inference failed. Please try to specify type argument explicitly : Kotlin</p>
  </blockquote>
  
  <p>in Android Studio. I tried similar in IntelliJ its working fine. </p>