mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: fix unreachable code error in if a := opt()
This commit is contained in:
@ -2663,6 +2663,7 @@ fn (p mut Parser) if_st(is_expr bool, elif_depth int) string {
|
||||
//token_idx: var_token_idx
|
||||
})
|
||||
p.statements()
|
||||
p.returns = false
|
||||
return 'void'
|
||||
} else {
|
||||
p.check_types(p.bool_expression(), 'bool')
|
||||
|
Reference in New Issue
Block a user