The inferred type can be either capture or type variable. This logic is covered by a new rule 'inferFromCapture'. For examples see 'Bounds' test sample. This inference is used in call arguments type inference. It happens on cases when bounds arise from several places: (a) bounds for inference variables from type vars declared in method signature (hasBound constraint) (b) bounds of type vars used as arguments to call (typeVariableType term wiht bounds inside) (c) bounds from captures on type variables from case (b), which come in the form of 'captureOf' term |
||
|---|---|---|
| .. | ||
| fitch | ||
| lambdacalc | ||
| mpscore | ||