Greg Stepniewski
10/29/2017, 9:21 PMclass A()
class B()
val kodein = Kodein {
bind<A>() with provider { A() }
}
fun main(args: Array<String>) {
val a: A = kodein.instance()
val b: B = kodein.instance()
}
A Dagger2 equivalent would not compile, because there would be no “@Provides” matching the “@Inject”. Kodein will let it run until the injection attempt and then crash. I agree that with the debug messages provided it is easy to track down and fix, but it does not prevent the error in the first place.