We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba86d61 commit c67891dCopy full SHA for c67891d
vlib/v/checker/checker.v
@@ -5330,11 +5330,7 @@ pub fn (mut c Checker) match_expr(mut node ast.MatchExpr) ast.Type {
5330
c.ensure_type_exists(node.cond_type, node.pos) or { return ast.void_type }
5331
c.check_expr_opt_call(node.cond, cond_type)
5332
cond_type_sym := c.table.get_type_symbol(cond_type)
5333
- if cond_type_sym.kind !in [.interface_, .sum_type] {
5334
- node.is_sum_type = false
5335
- } else {
5336
- node.is_sum_type = true
5337
- }
+ node.is_sum_type = cond_type_sym.kind in [.interface_, .sum_type]
5338
c.match_exprs(mut node, cond_type_sym)
5339
c.expected_type = cond_type
5340
mut ret_type := ast.void_type
0 commit comments