https://kotlinlang.org logo
#kodein
Title
j

jeggy

06/01/2018, 4:53 PM
I started getting this error from kodein, but I just can't figure out what I've done wrong. I'm getting this error:
Caused by: org.kodein.di.Kodein$OverridingException: Binding bind<String>(tag = "key") with ? { ? } must not override an existing binding.
Here's my code.
Copy code
val superKodein = Kodein { constant("key") with "value" }
val devKodein = Kodein {
    extend(superKodein, true)
    constant("key", overrides = true) with "test_value"
}
fun main(args: Array<String>) { println(devKodein.instance<String>(tag = "key")) }
Can anyone see what I'm missing?