patch 9.1.0346: Patch v9.1.0338 fixed sourcing a script with import

Commit: 
https://github.com/vim/vim/commit/1433ac93eb3acf28c55f0c4d775716ebee543160
Author: Ernie Rael <err...@raelity.com>
Date:   Wed Apr 17 22:36:32 2024 +0200

    patch 9.1.0346: Patch v9.1.0338 fixed sourcing a script with import
    
    Problem:  Patch v9.1.0338 fixed sourcing a script with import
    Solution: Add test `import './file.vim' and verify it works with `:source`
              so it does not regress (Ernie Rael)
    
    closes: #14577
    
    Signed-off-by: Ernie Rael <err...@raelity.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/testdir/test_vim9_import.vim b/src/testdir/test_vim9_import.vim
index 156b035d4..968bce08b 100644
--- a/src/testdir/test_vim9_import.vim
+++ b/src/testdir/test_vim9_import.vim
@@ -1140,6 +1140,31 @@ def Test_autoload_import_relative()
   v9.CheckScriptFailure(lines, 'E484:')
 enddef
 
+def Test_autoload_import_relative_compiled()
+  # autoload relative, access from compiled function. #14565
+  var lines =<< trim END
+    vim9script
+
+    export def F1(): string
+        return 'InFile.vim'
+    enddef
+  END
+  writefile(lines, 'xfile.vim', 'D')
+  lines =<< trim END
+    vim9script
+
+    import autoload './xfile.vim'
+
+    def F(): string
+      return xfile.F1()
+    enddef
+    assert_equal('InFile.vim', F())
+  END
+  new
+  setline(1, lines)
+  :source
+enddef
+
 def Test_autoload_import_relative_autoload_dir()
   mkdir('autoload', 'pR')
   var lines =<< trim END
diff --git a/src/version.c b/src/version.c
index e79bea470..490d4ad7f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    346,
 /**/
     345,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1rxC9P-00GX3j-Ro%40256bit.org.

Raspunde prin e-mail lui