Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boundType does not appear to support Any #619

Closed
matejdro opened this issue Jul 16, 2022 · 0 comments · Fixed by #623
Closed

boundType does not appear to support Any #619

matejdro opened this issue Jul 16, 2022 · 0 comments · Fixed by #623
Labels
bug Something isn't working

Comments

@matejdro
Copy link

matejdro commented Jul 16, 2022

This piece of code:

@ContributesMultibinding(ActivityInjection::class, boundType = Any::class)
class TestViewModel @Inject constructor() : SimpleStackViewModel() {
...
}

Will throw an error:

TestViewModel contributes a binding for kotlin.Any, but doesn't extend this type.

Obviously, this class DOES extend Any.

This worked in Anvil 2.3.4 but it's now broken in 2.4.1.

Setting bound type to the SimpleStackViewModel works, so it appears just using Any as a boundType is an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants