Kodein
Kodein copied to clipboard
Extend parameterized new to take more than one parameter using varargs
Would be nice to be able to pass multiple parameters to the parameterized new.
Hey, I made the parameterized new(), and you can't pass more parameters to parameterized new by design in Kodein (not me). Because factory() gives exactly one parameter. The parameters are wrapped in a class because of that. What prevents you from just passing the Params class you used for injection (as factory() argument) in new()?
I suspect that kotlin won't support vararg params unless of course they are of the same type. Even then, there will be issues with how we resolve them. That's exactly the problem Koin has with its assisted injection architecture.