Fixed
Status Update
Comments
vi...@google.com <vi...@google.com> #2
Thank you for your feedback. Team may reach out for more feedback in reproducing or triaging this issue.
da...@google.com <da...@google.com> #3
Yigit I'm pretty sure this is something you already fixed / cherry picked. But I wasn't 100% sure, nor did I know which bug to close this against, so assigning to you to confirm. Sorry about that!
b/142089765 - stack overflow bug?
One of the CLs around improving generics?
One of the CLs around improving generics?
ku...@gmail.com <ku...@gmail.com> #4
Still seeing in AGP 3.6 beta 2
yb...@google.com <yb...@google.com> #5
fixed on master but not planning to merge back into 3.6 since there is an easy workaround.
Description
The following example fails with:
error: `cannot generate view binders java.lang.IllegalArgumentException: void`
However changing Void -> Object fixes this.
public class DataBindingAdapter {
@BindingAdapter("app:run")
public static void run(@NonNull View view, @NonNull Closure<View, Void> closure) {
closure.run(view);
}
}
<layout xmlns:android="
xmlns:app="
<data>
<import type="android.view.View"/>
<variable name="var" type="com.example.Closure<View, Void>" />
</data>
<TextView
app:run="@{var}"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</layout>
Tested with AGP 3.6-alpha12