mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: add new
to reserved words
This commit is contained in:
parent
ddb5a8e6e4
commit
ff88906e9a
@ -36,7 +36,8 @@ const (
|
||||
'unsigned',
|
||||
'void',
|
||||
'volatile',
|
||||
'while'
|
||||
'while',
|
||||
'new'
|
||||
]
|
||||
)
|
||||
|
||||
@ -1926,11 +1927,9 @@ fn (mut g Gen) return_statement(node ast.Return) {
|
||||
return
|
||||
}
|
||||
fn_return_is_optional := g.fn_decl.return_type.flag_is(.optional)
|
||||
|
||||
// got to do a correct check for multireturn
|
||||
sym := g.table.get_type_symbol(g.fn_decl.return_type)
|
||||
fn_return_is_multi := sym.kind == .multi_return
|
||||
|
||||
// optional multi not supported
|
||||
if fn_return_is_multi && !fn_return_is_optional {
|
||||
g.write(' ')
|
||||
|
Loading…
x
Reference in New Issue
Block a user