koin-annotations
koin-annotations copied to clipboard
Generated module code is broken when annotations are ordered in the wrong way
trafficstars
Describe the bug Depending on the order different code is generated, which leads to weird behaviour.
To Reproduce
@Scope
class A
@Scope(A::class)
@Scoped
@KoinViewModel
class B: ViewModel
produces
scope<A> {
scoped { B }
}
while
@Scope
class A
@KoinViewModel
@Scoped
@Scope(A::class)
class B: ViewModel
will produce
scope<A> {
viewModel { B }
}
Expected behavior This isn't obvious and should perhaps be documented or fixed that any order results in the same code.
Koin module and version:
koin-annotations:1.3.0
thanks for your feedback