ComponentA (scopeA)
ComponentB (scopeB, dependencies = ComponentA)
ComponentC (scopeC, dependecies = ComponentB)
SubcomponentD (scopeA, created from ComponentC).
No exception is thrown though D has conflict with A (code)
If we leave only
ComponentA (scopeA)
SubcomponentD (scopeA, created from ComponentA)
then the conflicting scopes exception will be thrown.
Why in the first case no exception thrown?
I created an issue but no answer yet.
I got it. A subcomponent is a part of its parent component (not any ancestor subcomponent). So Dagger checks the scopes hierarchy for each component (not for the whole graph). See here.