boolean addConstraintsFromTypeParameters( TypeBinding subCandidate, ParameterizedTypeBinding ca, List<ConstraintFormula> constraints) { TypeBinding[] ai = ca.arguments; // C<A1,A2,...> if (ai == null) return true; // no arguments here means nothing to check TypeBinding cb = subCandidate.findSuperTypeOriginatingFrom(ca); // C<B1,B2,...> if (cb == null) return false; // nothing here means we failed if (TypeBinding.equalsEquals(ca, cb)) // incl C#RAW vs C#RAW return true; if (!(cb instanceof ParameterizedTypeBinding)) { // if C is parameterized with its own type variables, there're no more constraints to be // created here, otherwise let's fail return ca.isParameterizedWithOwnVariables(); } TypeBinding[] bi = ((ParameterizedTypeBinding) cb).arguments; if (cb.isRawType() || bi == null || bi.length == 0) return (this.isSoft && InferenceContext18.SIMULATE_BUG_JDK_8026527) ? true : false; // FALSE would conform to the spec for (int i = 0; i < ai.length; i++) constraints.add( ConstraintTypeFormula.create(bi[i], ai[i], TYPE_ARGUMENT_CONTAINED, this.isSoft)); return true; }