1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

match: fix typo and remove arrows

This commit is contained in:
ytakahashi
2019-11-01 00:58:19 +09:00
committed by Alexander Medvednikov
parent 7fa33fc250
commit 114953f28d
2 changed files with 35 additions and 31 deletions

View File

@ -3372,7 +3372,7 @@ fn (p mut Parser) switch_statement() {
'https://vlang.io/docs#match')
}
// Returns typ if used as expession
// Returns typ if used as expression
fn (p mut Parser) match_statement(is_expr bool) string {
p.check(.key_match)
p.cgen.start_tmp()
@ -3566,7 +3566,7 @@ fn (p mut Parser) match_statement(is_expr bool) string {
if is_expr {
// we get here if no else found, ternary requires "else" branch
p.error('Match expession requires "else"')
p.error('Match expression requires "else"')
}
p.returns = false // only get here when no default, so return is not guaranteed