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

-bare option

This commit is contained in:
Alexander Medvednikov
2019-11-14 06:50:21 +03:00
parent b1fa0d25f0
commit 1d460c4d49
2 changed files with 7 additions and 2 deletions

View File

@ -346,12 +346,10 @@ fn (p mut Parser) name_expr() string {
}
else if !p.is_var_decl && is_or_else {
f.typ = p.gen_handle_option_or_else(f.typ, '', fn_call_ph)
p.print_tok()
}
else if !p.is_var_decl && !is_or_else && !p.inside_return_expr &&
f.typ.starts_with('Option_') {
opt_type := f.typ[7..]
p.print_tok()
p.error('unhandled option type: `?$opt_type`')
}