Closed alexstaeding closed 5 months ago
Naturally, immediately after submitting the issue, I discovered my blunder:
The singleOf
utility method assumes all constructor parameters are to be initialized with get()
and does not use getAll()
as in the example in the docs.
Is there a sensible way of detecting a multi-bind in singleOf
and using getAll()
instead?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug According to the docs, it is possible to inject a List of dependencies by binding several implementations to a common supertype and injecting a List of that supertype.
I have a module with these bindings:
I try to inject a List of these dependencies in another service:
which results in this error:
Injecting
CommandRegistrar
andListenerRegistrar
separately works fine.To Reproduce Steps to reproduce the behavior:
Expected behavior It should be possible to inject all instances bound to this interface as in the docs.
Koin module and version: Reproduced on:
koin-core:3.5.0
koin-core:3.5.2-RC1
Snippet or Sample project to help reproduce MRE: