apatrida
07/05/2016, 2:19 PMval testConf = Paths.get(this.javaClass.getClassLoader().getResource("test.conf").toURI())!!
val kodein = Kodein {
constant("CONFIGFILE") with testConf
import(KovertApp.makeKodeinModule(testConf))
}
then later
val configFile: Path = kodein.instance("CONFIGFILE")
error
com.github.salomonbrys.kodein.Kodein$NotFoundException: No provider found for bind<Path>("CONFIGFILE")
which shows I have it bound as:
bind<UnixPath>("CONFIGFILE") with instance ( Path )
And there is nothing I can do to make it not bind as UnixPath
, casting, variable assignment, everything only gives me a UnixPath
constant("CONFIGFILE") with(testConf as Path)
Still binds UnixPath