Maps forward-references to later types parameters to the empty object type. This is used during inference when instantiating type parameter defaults.
(context *InferenceContext, index int)
| 75 | // Maps forward-references to later types parameters to the empty object type. |
| 76 | // This is used during inference when instantiating type parameter defaults. |
| 77 | func (c *Checker) newBackreferenceMapper(context *InferenceContext, index int) *TypeMapper { |
| 78 | forwardInferences := context.inferences[index:] |
| 79 | typeParameters := core.Map(forwardInferences, func(i *InferenceInfo) *Type { |
| 80 | return i.typeParameter |
| 81 | }) |
| 82 | return newArrayToSingleTypeMapper(typeParameters, c.unknownType) |
| 83 | } |
| 84 | |
| 85 | // TypeMapperBase |
| 86 |
no test coverage detected