https://kotlinlang.org logo
Title
a

Andreas Sinz

10/11/2017, 1:47 PM
@miha-x64 how does your
RootPresenterTag.get()
look like?
m

miha-x64

10/11/2017, 3:58 PM
It returns
Presenter<ARG, RET, HOST, PARENT, VIEW>
using its own type parameters. (generic class, non-generic function)
a

Andreas Sinz

10/11/2017, 5:23 PM
@miha-x64 does your
Presenter<...>
have the same generic contraints as the method?
m

miha-x64

10/11/2017, 8:29 PM
Yes.
a

Andreas Sinz

10/12/2017, 10:53 PM
can you post some code of your
Presenter
? I've tired to implement it with a simple class and it works fine here
m

miha-x64

10/13/2017, 7:15 AM
Sample code is here: https://github.com/Miha-x64/Flawless I'm using PresenterTag as a token, which is used by Fragment to get a Presenter.
a

Andreas Sinz

10/13/2017, 10:11 AM
Hm, seems fine to me. Maybe try to create a simple project reproducing this issue
m

miha-x64

10/13/2017, 10:29 AM
The code is not fine. There's no way for compiler to know whether are type parameters really mapped to actual type arguments. 🙂