mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
repl: fix comparison operator treated as statement (#18304)
This commit is contained in:
parent
5e12d3483c
commit
82035f7610
|
@ -423,7 +423,8 @@ fn run_repl(workdir string, vrepl_prefix string) int {
|
||||||
' as ',
|
' as ',
|
||||||
]
|
]
|
||||||
mut is_statement := false
|
mut is_statement := false
|
||||||
if filter_line.count('=') % 2 == 1 {
|
if filter_line.count('=') % 2 == 1
|
||||||
|
&& (filter_line.count('!=') + filter_line.count('>=') + filter_line.count('<=')) == 0 {
|
||||||
is_statement = true
|
is_statement = true
|
||||||
} else {
|
} else {
|
||||||
for pattern in possible_statement_patterns {
|
for pattern in possible_statement_patterns {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user