Method Invocation Type inference in JLS

44 views Asked by At

Consider the following article in JLS:9 (18.5.2.2. Additional Argument Constraints)

  • Here while adding actual arguments to form the set of Constraints - after the Type Parameters have been Reduced and Incorporated - we have the following clause:

Let θ be the substitution [P1:=α1, ..., Pp:=αp] defined in §18.5.1 to replace the type parameters of m with inference variables. Then, for all i (1 ≤ i ≤ k): If ei is not pertinent to applicability, C contains ‹ei → Fi θ›.

Clearly - when determining the "Invocation Applicability" the actual arguments expressions supplied are tested if they are "Pertinent to Applicabilility" and the Constraint set is being reduced and resolved and merged with the bound set.

My question is - that when we are trying to infer the "Invocation Type" why are actual argument expressions ei included in the set of valid constraints only when they are "not pertinent to applicability"?

0

There are 0 answers