(condExpr *ast.Node, condType *Type, body *ast.Node)
| 3805 | } |
| 3806 | |
| 3807 | func (c *Checker) checkTestingKnownTruthyTypes(condExpr *ast.Node, condType *Type, body *ast.Node) { |
| 3808 | condExpr = ast.SkipParentheses(condExpr) |
| 3809 | c.checkTestingKnownTruthyType(condExpr, condType, body) |
| 3810 | for ast.IsBinaryExpression(condExpr) && (condExpr.AsBinaryExpression().OperatorToken.Kind == ast.KindBarBarToken || condExpr.AsBinaryExpression().OperatorToken.Kind == ast.KindQuestionQuestionToken) { |
| 3811 | condExpr = ast.SkipParentheses(condExpr.AsBinaryExpression().Left) |
| 3812 | c.checkTestingKnownTruthyType(condExpr, condType, body) |
| 3813 | } |
| 3814 | } |
| 3815 | |
| 3816 | func (c *Checker) checkTestingKnownTruthyType(condExpr *ast.Node, condType *Type, body *ast.Node) { |
| 3817 | location := condExpr |
no test coverage detected