(inference *InferenceInfo)
| 1473 | } |
| 1474 | |
| 1475 | func (c *Checker) getTypeFromInference(inference *InferenceInfo) *Type { |
| 1476 | switch { |
| 1477 | case len(inference.candidates) != 0: |
| 1478 | return c.getUnionTypeEx(inference.candidates, UnionReductionSubtype, nil, nil) |
| 1479 | case len(inference.contraCandidates) != 0: |
| 1480 | return c.getIntersectionType(inference.contraCandidates) |
| 1481 | } |
| 1482 | return nil |
| 1483 | } |
| 1484 | |
| 1485 | func getInferenceInfoForType(n *InferenceState, t *Type) *InferenceInfo { |
| 1486 | if t.flags&TypeFlagsTypeVariable != 0 { |
no test coverage detected