Closed chrisjenx closed 2 weeks ago
Related to overloading class loader
https://github.com/InsertKoinIO/koin/issues/1363#issuecomment-1179536048
Would createAtStart fix this?
Nevermind, was trying to use JobRunr, gave up will use something else that doesn't require reflection.
Describe the bug
using Koin
get(klass)
will failMethod.invoke(instance, params)
on instances created by Koin.Using something like
MyClass::class.constructors.first().call()
will work tho.How does Koin instantiate classes? I thought it used the provided constructors in the module factories?
To Reproduce
Call a method on Class using
Method
reflection using a instance created byKoin.get(klass)
.Expected behavior I expected it to work the same way as
::class.constructors.first().call()
Koin module and version:
koin-core:3.4.+
using 4.0.0-RC1, version doesn't seem to matter Kotlin 2.0.20