You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code generation fails since Boolean transformed to primitive by kotlin compiler and Toothpick don't have such functionality
Iteration 2:
I forced kotlin to keep Boolean class class A @Inject constructor(@Named("name") val booleanValue: Boolean?)
This compiles but fails in the runtime since it can not find the provider No binding was defined for class java.lang.Boolean and name
Iteration 3:
I changed it to Any in the class and just cast it in runtime.
Am I doing something wrong and there is the simple solution?
The text was updated successfully, but these errors were encountered:
So I spend some time today trying to inject boolean field.
I have
class A @Inject constructor(@Named("name") val booleanValue: Boolean)
I created module:
Iteration 1:
Boolean
transformed to primitive by kotlin compiler and Toothpick don't have such functionalityIteration 2:
class A @Inject constructor(@Named("name") val booleanValue: Boolean?)
This compiles but fails in the runtime since it can not find the provider
No binding was defined for class java.lang.Boolean and name
Iteration 3:
Am I doing something wrong and there is the simple solution?
The text was updated successfully, but these errors were encountered: