Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 24469:e5db23a8ad98 v8.2.2774
patch 8.2.2774: Vim9: cannot import an existing name even when using "as"
Commit: https://github.com/vim/vim/commit/6c7cc347af4f4bc1bf180d80ef81413f89e78f56
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 17 16:38:50 2021 +0200
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 https://github.com/vim/vim/issues/8113)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 17 Apr 2021 16:45:05 +0200 |
parents | f0a3adf16f01 |
children | baf75c8e1b7b |
comparison
equal
deleted
inserted
replaced
24468:9f41bfdbc6fc | 24469:e5db23a8ad98 |
---|---|
1278 END | 1278 END |
1279 writefile(export_lines, 'XexportAs') | 1279 writefile(export_lines, 'XexportAs') |
1280 | 1280 |
1281 var import_lines =<< trim END | 1281 var import_lines =<< trim END |
1282 vim9script | 1282 vim9script |
1283 var one = 'notused' | |
1284 var yes = 777 | |
1283 import one as thatOne from './XexportAs' | 1285 import one as thatOne from './XexportAs' |
1284 assert_equal(1, thatOne) | 1286 assert_equal(1, thatOne) |
1285 import yes as yesYes from './XexportAs' | 1287 import yes as yesYes from './XexportAs' |
1286 assert_equal('yes', yesYes) | 1288 assert_equal('yes', yesYes) |
1287 END | 1289 END |