Annotations @Provides and @Singleton do not work together
Open
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 1.7k
- Avg merge
- 11m
- Merged PRs (30d)
- 2
Description
Hello
Annotations ```@Provides``` and ```@Singleton``` do not work together if I try to return class type instead of interface:
```
@Provides @Singleton
InMemoryTransactionLog provideTransactionLog() {
...
}
```
I look through the implementation and noticed, that method ```findScopeAnnotation(Errors, Class)``` just checks whether the provided class was marked by ```@Singleton``` annotation. The problem is that I can't mark by this annotation third party classes.
Contributor guide
Assessment
This issue has not been assessed yet.