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

repl: fix recognizing anonymous functions defs as function calls (fix #5006) (#6070)

This commit is contained in:
Maciej Michalec
2020-08-05 16:18:28 +02:00
committed by GitHub
parent ecaccafd31
commit 1152bbd243

View File

@ -54,7 +54,8 @@ fn (mut r Repl) checks() bool {
fn (r &Repl) function_call(line string) bool {
for function in r.functions_name {
if line.starts_with(function) {
is_function_definition := line.replace(' ', '').starts_with("$function:=")
if line.starts_with(function) && !is_function_definition {
return true
}
}