comparison src/eval.c @ 23972:a620df0ebbe5 v8.2.2528

patch 8.2.2528: Vim9: crash when compiling lambda fails Commit: https://github.com/vim/vim/commit/c7dac8534ee7f7a49e9d7a37330397c64455cdd7 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 17 18:49:11 2021 +0100 patch 8.2.2528: Vim9: crash when compiling lambda fails Problem: Vim9: crash when compiling lambda fails. Solution: Bail out after compilation fails. (closes https://github.com/vim/vim/issues/7862)
author Bram Moolenaar <Bram@vim.org>
date Wed, 17 Feb 2021 19:00:04 +0100
parents ba79ceac82ec
children 9fcd71d0db89
comparison
equal deleted inserted replaced
23971:275505319b80 23972:a620df0ebbe5
3426 if (ret == OK && evaluate) 3426 if (ret == OK && evaluate)
3427 { 3427 {
3428 ufunc_T *ufunc = rettv->vval.v_partial->pt_func; 3428 ufunc_T *ufunc = rettv->vval.v_partial->pt_func;
3429 3429
3430 // compile it here to get the return type 3430 // compile it here to get the return type
3431 compile_def_function(ufunc, 3431 if (compile_def_function(ufunc,
3432 TRUE, PROFILING(ufunc), NULL); 3432 TRUE, PROFILING(ufunc), NULL) == FAIL)
3433 {
3434 clear_tv(rettv);
3435 ret = FAIL;
3436 }
3433 } 3437 }
3434 } 3438 }
3435 if (ret == NOTDONE) 3439 if (ret == NOTDONE)
3436 { 3440 {
3437 *arg = skipwhite_and_linebreak(*arg + 1, evalarg); 3441 *arg = skipwhite_and_linebreak(*arg + 1, evalarg);