Issue with higher order function as a binding adapter : <p>I am running into issues trying to take a function as a parameter in a binding adapter using Kotlin/Android databinding. This example code throws <code>e: error: cannot generate view binders java.lang.StackOverflowError</code> when building with no other useful info in the log. </p>

<p>Here is my binding adapter:</p>

<pre><code>@JvmStatic
@BindingAdapter("onDelayedClick")
fun onDelayedClick(view: View, function: () -&gt; Unit) {
    // TODO: Do something
}
</code></pre>

<p>XML:</p>

<pre><code>        &lt;View
            android:id="@+id/test_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:onDelayedClick="@{() -&gt; viewModel.testFunction()}"/&gt;
</code></pre>

<p>and method in my ViewModel: </p>

<pre><code>fun testFunction() = Unit
</code></pre>

<p>I have been struggling with this for a bit now and nothing I've tried works, so any help is appreciated.</p>
