evant / kotlin-inject

Dependency injection lib for kotlin
Apache License 2.0
1.14k stars 51 forks source link

Allows annotating types with a qualifier #384

Closed evant closed 3 weeks ago

evant commented 2 months ago
@Inject(@Qualifier("a") a: String)

and

@Inject(a: @Qualifier("a") String)

are equivalent.

For now, only annotating the outer type (no type args) is supported.

This lays the groundwork for allowing

typealias A = @Qualifier("a") String

to work in the future when typealias no longer work as a qualifier by itself.

Relates to #253