Fix broken circular references detection

This commit is contained in:
Guillaume Nodet 2024-09-10 21:22:47 +02:00
parent 8a61f7d20a
commit 0c7e73335d
1 changed files with 2 additions and 3 deletions

View File

@ -144,10 +144,9 @@ private Injector doBind(Key<?> key, Binding<?> binding) {
doBindImplicit(key, binding);
Class<?> cls = key.getRawType().getSuperclass();
while (cls != Object.class && cls != null) {
key = Key.of(cls, key.getQualifier());
doBindImplicit(key, binding);
doBindImplicit(Key.of(cls, key.getQualifier()), binding);
if (key.getQualifier() != null) {
bind(Key.ofType(key.getType()), binding);
bind(Key.ofType(cls), binding);
}
cls = cls.getSuperclass();
}