test cases for jsr335 18.5.2

Rafkind, Jon jon.rafkind at hp.com
Thu Feb 27 16:50:55 PST 2014

Does anyone have a test case that triggers either of these two cases (1
and 2 below) in JSR 335 - 18.5.2?

* Otherwise, if R θ is an inference variable α, and one of the following
conditions are true, then α is resolved in B2, and where the capture of
the resulting instantiation of α is U, the constraint formula ⟨U → T⟩ is
reduced and incorporated.
1. T is a reference type, but is not a wildcard-parameterized type, and
either i) B2 contains a bound of one of the forms α = S or S <: α, where
S is a wildcard-parameterized type, or ii) B2 contains two bounds of the
forms S1 <: α and S2 <: α, where S1 and S2 have supertypes (4.10) that
are two different parameterizations of the same generic class or interface.
2. T is a parameterization of a generic class or interface, G, and B2
contains a bound of one of the forms α = S or S <: α, where there exists
no type of the form G<...> that is a supertype of S, but the raw type G
is a supertype of S.

More information about the lambda-spec-observers mailing list