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

SlimInjector IllegalArgumentException (lambda) #8

Closed
fcannizzaro opened this issue May 14, 2017 · 2 comments
Closed

SlimInjector IllegalArgumentException (lambda) #8

fcannizzaro opened this issue May 14, 2017 · 2 comments

Comments

@fcannizzaro
Copy link
Contributor

Using lambda instead of anonymous class make it crash.

(Episode episode, IViewInjector view) -> {                    
  // code
})

instead of

new SlimInjector<Episode>() {
    @Override
    public void onInject(Episode episode, IViewInjector view) {
        // code
    }
})
@miszmaniac
Copy link

Sadly you can't use it with lambda as there is no way to get type information after code is compiled.
We've made fork https://github.com/kubatatami/SlimAdapter where we added second parameter with class in register method, just to make it work with lambda.

@linisme
Copy link
Owner

linisme commented May 22, 2017

@miszmaniac thanks again for your solution

@linisme linisme closed this as completed May 22, 2017
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

No branches or pull requests

3 participants