mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vrepl: fix optional call
This commit is contained in:
parent
514ee9d396
commit
5f36874c9b
@ -198,7 +198,7 @@ fn run_repl(workdir string, vrepl_prefix string) {
|
||||
'=', '++', '--', '<<',
|
||||
'//', '/*',
|
||||
'fn ', 'pub ', 'mut ', 'enum ', 'const ', 'struct ', 'interface ', 'import ',
|
||||
'#include ', ':=', 'for '
|
||||
'#include ', ':=', 'for ', 'or '
|
||||
]
|
||||
mut is_statement := false
|
||||
for pattern in possible_statement_patterns {
|
||||
|
3
vlib/v/tests/repl/optional_call.repl
Normal file
3
vlib/v/tests/repl/optional_call.repl
Normal file
@ -0,0 +1,3 @@
|
||||
import os
|
||||
os.cp('', '') or {return}
|
||||
===output===
|
Loading…
Reference in New Issue
Block a user