If you look into kotlin bytecode you’ll find that the code you’ve written is translated into following:
public final class SomeSingleton {
public static LProperty; property // <- Notice static field here
public final getProperty()LProperty
...
public final setProperty(LProperty)V
...
}
As you can see the actual field is static which makes it uneligible for instance injection. You may try to move @Inject
annotation onto setter method by doing so:
object SomeSingleton {
@set:Inject
lateinit var property: Property
...
}