I am raising an issue here to raise attention of this issue. The bug currently makes it impossible to have a typealias of the @Inject annotation to enable multiplatform support for example and there are probably many more usecases where the behaviour I am going to describe breaks things.
There is an issue in the Kotlin issue tracker that provides more context but this is the gist of it. It isn't currently possible to create a ViewModel like this and have it injected by Dagger Hilt:
I am raising an issue here to raise attention of this issue. The bug currently makes it impossible to have a typealias of the @Inject annotation to enable multiplatform support for example and there are probably many more usecases where the behaviour I am going to describe breaks things.
There is an issue in the Kotlin issue tracker that provides more context but this is the gist of it. It isn't currently possible to create a ViewModel like this and have it injected by Dagger Hilt: