Skip to content

Commit

Permalink
Update vlib/v/checker/match.v
Browse files Browse the repository at this point in the history
Co-authored-by: JalonSolov <JalonSolov@gmail.com>
  • Loading branch information
ttytm and JalonSolov committed Apr 4, 2024
1 parent 3f133fc commit ac646c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/v/checker/match.v
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ fn (mut c Checker) match_exprs(mut node ast.MatchExpr, cond_type_sym ast.TypeSym
}
}
if node.branches.len == 0 {
c.error('`match` must have at least two branches', node.pos)
c.error('`match` must have at least two branches including `else`, or an exhaustive set of branches', node.pos)
return
}
mut else_branch := node.branches.last()
Expand Down

0 comments on commit ac646c5

Please sign in to comment.