If I have a wildcard ? extends Foo passed to a type variable T extends Bar, the "effective" upper bound of the wildcard is the greatest-lower bound (GLB) of Foo and Bar (see JLS 5.1.10). Right now, our JSpecify wildcards code (the wildcardUpperBound method) just looks at the explicit Foo upper bound in this case; it should compute the GLB instead.
If I have a wildcard
? extends Foopassed to a type variableT extends Bar, the "effective" upper bound of the wildcard is the greatest-lower bound (GLB) of Foo and Bar (see JLS 5.1.10). Right now, our JSpecify wildcards code (thewildcardUpperBoundmethod) just looks at the explicitFooupper bound in this case; it should compute the GLB instead.