mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.2774: Vim9: cannot import an existing name even when using "as"
Problem: Vim9: cannot import an existing name even when using "as". Solution: Do not check for an existing name when using "as". (closes #8113)
This commit is contained in:
@@ -1280,6 +1280,8 @@ def Test_import_as()
|
|||||||
|
|
||||||
var import_lines =<< trim END
|
var import_lines =<< trim END
|
||||||
vim9script
|
vim9script
|
||||||
|
var one = 'notused'
|
||||||
|
var yes = 777
|
||||||
import one as thatOne from './XexportAs'
|
import one as thatOne from './XexportAs'
|
||||||
assert_equal(1, thatOne)
|
assert_equal(1, thatOne)
|
||||||
import yes as yesYes from './XexportAs'
|
import yes as yesYes from './XexportAs'
|
||||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2774,
|
||||||
/**/
|
/**/
|
||||||
2773,
|
2773,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -600,7 +600,8 @@ handle_import(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (check_defined(name, len, cctx, FALSE) == FAIL)
|
if (as_name == NULL
|
||||||
|
&& check_defined(name, len, cctx, FALSE) == FAIL)
|
||||||
goto erret;
|
goto erret;
|
||||||
|
|
||||||
imported = new_imported(gap != NULL ? gap
|
imported = new_imported(gap != NULL ? gap
|
||||||
|
Reference in New Issue
Block a user