I can’t seem to get this to compile: `singleOf<Foo...
# koin
m
I can’t seem to get this to compile:
singleOf<Foo>(::FooImpl)
It works without the generic argument, but I don’t want to expose
FooImpl
. Any ideas? EDIT: oh I see someone just asked this last week. So:
Copy code
singleOf(::FooImpl) {
    bind<Foo>()
}
Curious why it’s not possible for the brief form?
a
yes, the constructor style doesn't take the reified argument for bound type. You need the lambda + bind keyword as you wrote 👍
m
Thanks Arnaud. Is it technically not possible to support the reified argument?
a
Thanks Arnaud. Is it technically not possible to support the reified argument?
this DSL part is not ideal, this is why I open exploration on compiler plugin backed up DSL to help write minimum reified stuff and let the plugin generate most of the part
👍 1