You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When indexing multiple classes, during class signature parsing/resolution, the wrong bounds can be resolved for a type variable, because the indexer reuses the signature parser and the signature parser reuses resolved type variables between consecutive calls to the index method.
Reproduce with:
packagecom.example;
publicinterfaceWithMethodSignature {
public <EextendsRunnable> EmyMethod(Earg);
}
packagecom.example;
importjava.util.Iterator;
publicinterfaceWithClassSignature<EextendsException> extendsIterator<E/*what's the bound?*/ > {
}
Fix is a single line of code. The signature parser forgets previously encountered element-level type parameters when parsing a new element, and previously encountered class-level type parameters when parsing a new class. It doesn't forget previously encountered element-level type parameters when parsing a new class, which it should.
When indexing multiple classes, during class signature parsing/resolution, the wrong bounds can be resolved for a type variable, because the indexer reuses the signature parser and the signature parser reuses resolved type variables between consecutive calls to the index method.
Reproduce with:
The text was updated successfully, but these errors were encountered: