Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 25425:effe5f2b4d01 v8.2.3249
patch 8.2.3249: Vim9: error for re-imported function with default argument
Commit: https://github.com/vim/vim/commit/60dc8274e9f8c6a20d54efebc7a8752fe062eead
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 29 22:48:54 2021 +0200
patch 8.2.3249: Vim9: error for re-imported function with default argument
Problem: Vim9: error for re-imported function with default argument.
Solution: Do not check argument type if it is still unknown. (closes https://github.com/vim/vim/issues/8653)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 29 Jul 2021 23:00:04 +0200 |
parents | 3e56078569ca |
children | dcd45fe7fe2e |
comparison
equal
deleted
inserted
replaced
25424:3cf272d6ee04 | 25425:effe5f2b4d01 |
---|---|
1624 | 1624 |
1625 def Test_vim9script_reload_noclear() | 1625 def Test_vim9script_reload_noclear() |
1626 var lines =<< trim END | 1626 var lines =<< trim END |
1627 vim9script | 1627 vim9script |
1628 export var exported = 'thexport' | 1628 export var exported = 'thexport' |
1629 | |
1630 export def TheFunc(x = 0) | |
1631 enddef | |
1629 END | 1632 END |
1630 writefile(lines, 'XExportReload') | 1633 writefile(lines, 'XExportReload') |
1631 lines =<< trim END | 1634 lines =<< trim END |
1632 vim9script noclear | 1635 vim9script noclear |
1633 g:loadCount += 1 | 1636 g:loadCount += 1 |
1635 import exported from './XExportReload' | 1638 import exported from './XExportReload' |
1636 | 1639 |
1637 def Again(): string | 1640 def Again(): string |
1638 return 'again' | 1641 return 'again' |
1639 enddef | 1642 enddef |
1643 | |
1644 import TheFunc from './XExportReload' | |
1645 TheFunc() | |
1640 | 1646 |
1641 if exists('s:loaded') | finish | endif | 1647 if exists('s:loaded') | finish | endif |
1642 var s:loaded = true | 1648 var s:loaded = true |
1643 | 1649 |
1644 var s:notReloaded = 'yes' | 1650 var s:notReloaded = 'yes' |