Skip to content

Can't use Inject annotation in @HiltViewModel classes #4

@IsakTheHacker

Description

@IsakTheHacker

Describe the bug
A clear and concise description of what the bug is.
When using the @HiltViewModel annotation to help with dependency injection it isn't possible to use the @Inject annotations from this library.

To Reproduce

import com.chrynan.inject.Inject

@HiltViewModel
class ExampleViewModel @Inject constructor() : ViewModel() {

}

Expected behavior
No compilation errors such as

@HiltViewModel annotated class should contain exactly one @Inject or @AssistedInject annotated constructor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions