https://kotlinlang.org logo
#koin-contributors
Title
# koin-contributors
k

Kirill Rozov

04/09/2020, 12:05 PM
@arnaud.giuliani, I haven’t understand about what default parameters you talk
a

arnaud.giuliani

04/09/2020, 12:10 PM
Hey @Kirill Rozov here is an eaxmple of checkModules with default parameters injection: https://github.com/InsertKoinIO/koin/blob/master/koin-projects/koin-test/src/test/kotlin/org/koin/test/CheckModulesTest.kt#L109
k

Kirill Rozov

04/09/2020, 12:52 PM
But
SavedStateHandle
argument must be available for injection via
stateViewModel
If I remove
SavedStateHandle
from the arguments everything will work fine
a

arnaud.giuliani

04/09/2020, 12:53 PM
yes, then to check it with checkModules we need to provide at least a default one
k

Kirill Rozov

04/09/2020, 12:54 PM
I think it will be better that
SavedStateHandle
for
viewModel{ }
declaration will work withoud addition parameter
Because sample from the issues is valid code in runtime
But
checkModules
fails
a

arnaud.giuliani

04/09/2020, 1:25 PM
I see
k

Kirill Rozov

04/09/2020, 1:25 PM
Is it normal?
a

arnaud.giuliani

04/09/2020, 1:41 PM
as we are using param injection here ... yes
but then, it’s not super great 😕
2 Views