]> granicus.if.org Git - vim/commitdiff
patch 8.2.4574: Vim9: test for profiling fails v8.2.4574
authorBram Moolenaar <Bram@vim.org>
Tue, 15 Mar 2022 16:16:47 +0000 (16:16 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 15 Mar 2022 16:16:47 +0000 (16:16 +0000)
Problem:    Vim9: test for profiling fails.
Solution:   Mark function for profiling earlier to avoid E1271.

src/testdir/test_vim9_script.vim
src/version.c

index dfa2a2d288d62d87800cbaa3eeb888da22ea93f3..ec0d54797f585f3d687c59384b79988028bedf18 100644 (file)
@@ -3944,13 +3944,13 @@ def Test_profile_with_lambda()
       def Profile()
         profile start Xprofile.log
         profile func ProfiledWithLambda
-        ProfiledWithLambda()
-
+        # mark ProfiledNested for profiling to avoid E1271
         profile func ProfiledNested
+        ProfiledWithLambda()
         ProfiledNested()
 
-        # Also profile the nested function.  Use a different function, although the
-        # contents is the same, to make sure it was not already compiled.
+        # Also profile the nested function.  Use a different function, although
+        # the contents is the same, to make sure it was not already compiled.
         profile func *
         g:ProfiledNestedProfiled()
 
index 9e5e142fd295e6c00af84e60b7f3d780ba0454d1..4dfbdd59d3cea02c40b37a5a29d27e27814c5343 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4574,
 /**/
     4573,
 /**/