Problem: Vim9: cannot import an existing name even when using "as".
Solution: Do not check for an existing name when using "as". (closes #8113)
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'
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2774,
/**/
2773,
/**/
}
else
{
- if (check_defined(name, len, cctx, FALSE) == FAIL)
+ if (as_name == NULL
+ && check_defined(name, len, cctx, FALSE) == FAIL)
goto erret;
imported = new_imported(gap != NULL ? gap