comparison src/vim9execute.c @ 24404:a2a7d2d6e724 v8.2.2742

patch 8.2.2742: Vim9: when compiling a function fails it is cleared Commit: https://github.com/vim/vim/commit/701cc6ca9e940665a9424541f989bb38c853a498 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 10 13:33:48 2021 +0200 patch 8.2.2742: Vim9: when compiling a function fails it is cleared Problem: Vim9: when compiling a function fails it is cleared. Solution: Keep the function lines, prevent execution with a different status. (closes #8093)
author Bram Moolenaar <Bram@vim.org>
date Sat, 10 Apr 2021 13:45:05 +0200
parents 62e978382fa0
children f539864ba851
comparison
equal deleted inserted replaced
24403:1df57caa70c0 24404:a2a7d2d6e724
1295 1295
1296 // Get pointer to a local variable on the stack. Negative for arguments. 1296 // Get pointer to a local variable on the stack. Negative for arguments.
1297 #define STACK_TV_VAR(idx) (((typval_T *)ectx.ec_stack.ga_data) + ectx.ec_frame_idx + STACK_FRAME_SIZE + idx) 1297 #define STACK_TV_VAR(idx) (((typval_T *)ectx.ec_stack.ga_data) + ectx.ec_frame_idx + STACK_FRAME_SIZE + idx)
1298 1298
1299 if (ufunc->uf_def_status == UF_NOT_COMPILED 1299 if (ufunc->uf_def_status == UF_NOT_COMPILED
1300 || ufunc->uf_def_status == UF_COMPILE_ERROR
1300 || (func_needs_compiling(ufunc, PROFILING(ufunc)) 1301 || (func_needs_compiling(ufunc, PROFILING(ufunc))
1301 && compile_def_function(ufunc, FALSE, PROFILING(ufunc), NULL) 1302 && compile_def_function(ufunc, FALSE, PROFILING(ufunc), NULL)
1302 == FAIL)) 1303 == FAIL))
1303 { 1304 {
1304 if (did_emsg_cumul + did_emsg == did_emsg_before) 1305 if (did_emsg_cumul + did_emsg == did_emsg_before)