Open AdriaBosch opened 3 months ago
Ok I think I tracked down the cause of the issue. The expression for a given type is cached so it doesn't have to be recalculated when used in different places. However, when there is a a cycle that caching includes the reference to the lateinit variable, but not the lateinit variable itself. So when it's reused that variable doesn't exist.
I acknowledge that the following graph is not ideal, but I believe it should compile without the need for any workarounds.
I was able to compile by declaring the Interceptor dependency within the component.
or by removing the
@Singleton
annotation fromInterceptor
.