diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2024-05-03 18:24:07 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-05-03 18:27:51 +0200 |
commit | 5715a726282018e708cff7dd930c9f8f7c37fa7e (patch) | |
tree | f6c0049084d51445a5d1bd00d47447981707b16f /src/userfunc.c | |
parent | c8330b8fff8e44c450a606ba91c1fec5f41478f7 (diff) |
patch 9.1.0391: Vim9: could improve testingv9.1.0391
Problem: Vim9: could improve testing
(Ernie Rael)
Solution: Support defcompile for test_override() to
improve testing (Yegappan Lakshmanan)
fixes: #14553
closes: #14712
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/userfunc.c')
-rw-r--r-- | src/userfunc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/userfunc.c b/src/userfunc.c index 71b39837c7..7536234b82 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -5452,6 +5452,10 @@ define_function( // :func does not use Vim9 script syntax, even in a Vim9 script file fp->uf_script_ctx.sc_version = SCRIPT_VERSION_MAX; + // If test_override('defcompile' 1) is used, then compile the function now + if (eap->cmdidx == CMD_def && override_defcompile) + defcompile_function(fp, NULL); + goto ret_free; erret: |