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

Arrow resilience causes an undeclared type variable: Input error when compiling #3499

Open
dave08 opened this issue Oct 7, 2024 · 1 comment · May be fixed by #3504
Open

Arrow resilience causes an undeclared type variable: Input error when compiling #3499

dave08 opened this issue Oct 7, 2024 · 1 comment · May be fixed by #3504

Comments

@dave08
Copy link

dave08 commented Oct 7, 2024

I used this code:

private val recur2 = Schedule.recurs<CallError>(3)

...
recur2.retryEither {
   searchApi.getSuggestions(...) // returns an Either<CallError, List<String>>
}

and I get this error when compiling:

error: cannot access SearchSuggestionsViewModel
    public abstract ViewModel binds(SearchSuggestionsViewModel vm);
                                    ^
  bad class file: /home/.../app/build/tmp/kotlin-classes/debug/.../searchScreens/SearchSuggestionsViewModel.class
    undeclared type variable: Input
    Please remove or make sure it appears in the correct subdirectory of the classpath.
@dave08
Copy link
Author

dave08 commented Oct 7, 2024

See #3325 for a similar issue.

It seems like the problem is that Schedule is a value class... I copied the code to my project and removed value and @JvmInline on Schedule and it works... it would be nice to be able to keep it as a value class, but if it doesn't work otherwise... then it's not the worst thing to not have it.

@serras serras linked a pull request Oct 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant