(f *FlowState, expr *ast.Node)
| 736 | } |
| 737 | |
| 738 | func (c *Checker) isMatchingConstructorReference(f *FlowState, expr *ast.Node) bool { |
| 739 | if ast.IsAccessExpression(expr) { |
| 740 | if accessedName, ok := c.getAccessedPropertyName(expr); ok && accessedName == "constructor" && c.isMatchingReference(f.reference, expr.Expression()) { |
| 741 | return true |
| 742 | } |
| 743 | } |
| 744 | return false |
| 745 | } |
| 746 | |
| 747 | func (c *Checker) narrowTypeByConstructor(t *Type, operator ast.Kind, identifier *ast.Node, assumeTrue bool) *Type { |
| 748 | // Do not narrow when checking inequality. |
no test coverage detected