1
0
forked from aniani/vim

patch 8.2.3005: Vim9: using a void value does not give a proper error message

Problem:    Vim9: using a void value does not give a proper error message.
Solution:   Give a clear error message. (clodes #8387)
This commit is contained in:
Bram Moolenaar
2021-06-15 22:13:27 +02:00
parent 8ac681a280
commit f57b43c230
7 changed files with 71 additions and 48 deletions

View File

@@ -9679,8 +9679,8 @@ nextline:
goto erret;
}
// Return zero if there is no return at the end.
generate_instr(&cctx, ISN_RETURN_ZERO);
// Return void if there is no return at the end.
generate_instr(&cctx, ISN_RETURN_VOID);
}
// When compiled with ":silent!" and there was an error don't consider the
@@ -10047,7 +10047,7 @@ delete_instr(isn_T *isn)
case ISN_REDIREND:
case ISN_REDIRSTART:
case ISN_RETURN:
case ISN_RETURN_ZERO:
case ISN_RETURN_VOID:
case ISN_SHUFFLE:
case ISN_SLICE:
case ISN_STORE: