mirror of
https://github.com/vim/vim.git
synced 2025-10-04 05:25:06 -04:00
patch 8.2.3807: Vim9: can call import with star directly
Problem: Vim9: can call import with star directly. Solution: Check that the import used star.
This commit is contained in:
@@ -1536,6 +1536,21 @@ def Test_import_star_fails()
|
||||
CheckScriptFailure(lines, 'E1047:')
|
||||
|
||||
delete('Xfoo.vim')
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
def TheFunc()
|
||||
echo 'the func'
|
||||
enddef
|
||||
export var Ref = TheFunc
|
||||
END
|
||||
writefile([], 'Xthat.vim')
|
||||
lines =<< trim END
|
||||
import * as That from './Xthat.vim'
|
||||
That()
|
||||
END
|
||||
CheckDefAndScriptFailure2(lines, 'E1094:', 'E1236: Cannot use That itself')
|
||||
delete('Xthat.vim')
|
||||
enddef
|
||||
|
||||
def Test_import_as()
|
||||
|
Reference in New Issue
Block a user