To: vim_dev@googlegroups.com Subject: Patch 8.2.2774 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2774 Problem: Vim9: cannot import an existing name even when using "as". Solution: Do not check for an existing name when using "as". (closes #8113) Files: src/vim9script.c, src/testdir/test_vim9_script.vim *** ../vim-8.2.2773/src/vim9script.c 2021-04-13 20:53:09.846201149 +0200 --- src/vim9script.c 2021-04-17 16:37:47.955147433 +0200 *************** *** 600,606 **** } else { ! if (check_defined(name, len, cctx, FALSE) == FAIL) goto erret; imported = new_imported(gap != NULL ? gap --- 600,607 ---- } else { ! if (as_name == NULL ! && check_defined(name, len, cctx, FALSE) == FAIL) goto erret; imported = new_imported(gap != NULL ? gap *** ../vim-8.2.2773/src/testdir/test_vim9_script.vim 2021-04-15 21:48:29.023181466 +0200 --- src/testdir/test_vim9_script.vim 2021-04-17 16:37:18.487241543 +0200 *************** *** 1280,1285 **** --- 1280,1287 ---- var import_lines =<< trim END vim9script + var one = 'notused' + var yes = 777 import one as thatOne from './XexportAs' assert_equal(1, thatOne) import yes as yesYes from './XexportAs' *** ../vim-8.2.2773/src/version.c 2021-04-17 14:06:36.014598855 +0200 --- src/version.c 2021-04-17 16:36:06.139473871 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2774, /**/ -- hundred-and-one symptoms of being an internet addict: 113. You are asked about a bus schedule, you wonder if it is 16 or 32 bits. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///