Return the flow cache key for a "dotted name" (i.e. a sequence of identifiers separated by dots). The key consists of the id of the symbol referenced by the leftmost identifier followed by zero or more property names separated by dots. The result is nonDottedNameCacheKey if the reference isn't a dot
(f *FlowState)
| 1634 | // leftmost identifier followed by zero or more property names separated by dots. |
| 1635 | // The result is nonDottedNameCacheKey if the reference isn't a dotted name. |
| 1636 | func (c *Checker) getFlowReferenceKey(f *FlowState) CacheHashKey { |
| 1637 | var b keyBuilder |
| 1638 | if c.writeFlowCacheKey(&b, f.reference, f.declaredType, f.initialType, f.flowContainer) { |
| 1639 | return b.hash() |
| 1640 | } |
| 1641 | return nonDottedNameCacheKey // Reference isn't a dotted name |
| 1642 | } |
| 1643 | |
| 1644 | func (c *Checker) writeFlowCacheKey(b *keyBuilder, node *ast.Node, declaredType *Type, initialType *Type, flowContainer *ast.Node) bool { |
| 1645 | switch node.Kind { |
no test coverage detected