Kotlin Property: "Type parameter of a property must be used in its receiver type" : <p>I have the following simple Kotlin extension functions:</p>

<pre><code>// Get the views of ViewGroup
inline val ViewGroup.views: List&lt;View&gt;
    get() = (0..childCount - 1).map { getChildAt(it) }

// Get the views of ViewGroup of given type
inline fun &lt;reified T : View&gt; ViewGroup.getViewsOfType() : List&lt;T&gt; {
    return this.views.filterIsInstance&lt;T&gt;()
}
</code></pre>

<p>This code compiles and works fine. But, I want the function <code>getViewsOfType</code> to be a property, just like the <code>views</code>. Android Studio even suggests it. I let AS do the refactoring and it generates this code:</p>

<pre><code>inline val &lt;reified T : View&gt; ViewGroup.viewsOfType: List&lt;T&gt;
    get() = this.views.filterIsInstance&lt;T&gt;()
</code></pre>

<p>But this code doesn't compile. It causes error: "Type parameter of a property must be used in its receiver type"</p>

<p>What is the issue here? Searching for help on this error doesn't seem to lead to an answer.</p>
