use of net.sourceforge.pmd.lang.java.typeresolution.typeinference.BoundOrConstraint in project pmd by pmd.
the class TypeInferenceTest method testSubtypeReduceVariableVsAny.
@Test
public void testSubtypeReduceVariableVsAny() {
// Otherwise, if S is an inference variable, α, the constraint reduces to the bound α <: T.
List<BoundOrConstraint> result = new Constraint(alpha, integer, SUBTYPE).reduce();
assertEquals(1, result.size());
testBoundOrConstraint(result.get(0), alpha, integer, SUBTYPE, Bound.class);
}
use of net.sourceforge.pmd.lang.java.typeresolution.typeinference.BoundOrConstraint in project pmd by pmd.
the class TypeInferenceTest method testEqualityReduceVariableVsNotPrimitive.
@Test
public void testEqualityReduceVariableVsNotPrimitive() {
// Otherwise, if S is an inference variable, α, and T is not a primitive type, the constraint reduces to
// the bound α = T.
List<BoundOrConstraint> result = new Constraint(alpha, number, EQUALITY).reduce();
assertEquals(1, result.size());
testBoundOrConstraint(result.get(0), alpha, number, EQUALITY, Bound.class);
}
Aggregations