(node *ast.Node, checkMode CheckMode)
| 10906 | } |
| 10907 | |
| 10908 | func (c *Checker) checkConditionalExpression(node *ast.Node, checkMode CheckMode) *Type { |
| 10909 | cond := node.AsConditionalExpression() |
| 10910 | t := c.checkTruthinessExpression(cond.Condition, checkMode) |
| 10911 | c.checkTestingKnownTruthyCallableOrAwaitableOrEnumMemberType(cond.Condition, t, cond.WhenTrue) |
| 10912 | type1 := c.checkExpressionEx(cond.WhenTrue, checkMode) |
| 10913 | type2 := c.checkExpressionEx(cond.WhenFalse, checkMode) |
| 10914 | return c.getUnionTypeEx([]*Type{type1, type2}, UnionReductionSubtype, nil, nil) |
| 10915 | } |
| 10916 | |
| 10917 | func (c *Checker) checkTruthinessExpression(node *ast.Node, checkMode CheckMode) *Type { |
| 10918 | return c.checkTruthinessOfType(c.checkExpressionEx(node, checkMode), node) |
no test coverage detected