15.12.2.7: Inferring Type Arguments Based on Actual Arguments
Strategy details
|
ATerm
|
infer-type-arguments(ATerm initial-constraints)
|
Given a list of initial constraints, infers the type arguments forall formal type parameters of the method.
type
|
Method Object -> Hashtable(TypeVar, List(Type))
|
|
|
ATerm
|
infer-type-arguments-from-constraints(ATerm tvs)
|
No information available.
type
|
List(Constraint) -> Hashtable(TypeVar, List(Type))
|
|
|
ATerm
|
resolve-constraints(ATerm typevars)
|
Result list can contain duplicates, even with different values forillegal invocations. These should usually be reported as errors by theinvoker of this strategy.
type
|
List(Constraint) -> Hashtable(TypeVar, List(Type))
|
|
|
ATerm
|
resolve-implied-equality-constraint(ATerm constraints, ATerm results)
|
From Tj = U, where U is not a type variable.
todo
|
Should the lhs be rewritten?
|
todo
|
Should equality constrains be rewritten?
|
|
|
ATerm
|
resolve-implied-equality-constraint(ATerm constraints, ATerm results)
|
Form Tj = Tj
|
|
ATerm
|
resolve-implied-equality-constraint(ATerm constraints, ATerm results)
|
Form Tj = Tk, where k != j.
todo
|
I think this equality should be recorded?
|
todo
|
Should equality constrains be rewritten?
|
todo
|
Should the lhs of the constraints be rewritten?
|
|
|
ATerm
|
resolve-implied-equality-constraints(ATerm results)
|
No information available.
type
|
List(Constraint) -> List(Constraint)
|
|
|
ATerm
|
resolve-supertype-constaints(ATerm typevars, ATerm results)
|
No information available.
todo
|
Limit inference to remaining type variables?
|
type
|
List(Constraints) -> _
|
|
|
ATerm
|
resolve-supertype-constaints(ATerm typevar)
|
No information available.
|
|