comparison src/testdir/test_vim9_assign.vim @ 25141:99f6087a5fd2 v8.2.3107

patch 8.2.3107: Vim9: error for arguments while type didn't specify arguments Commit: https://github.com/vim/vim/commit/22f85d04594e1a09936227ef62955a7939d584b4 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 4 23:29:30 2021 +0200 patch 8.2.3107: Vim9: error for arguments while type didn't specify arguments Problem: Vim9: error for arguments while type didn't specify arguments. Solution: Do not update that type to check when no argument count is specified. (closes #8492)
author Bram Moolenaar <Bram@vim.org>
date Sun, 04 Jul 2021 23:30:03 +0200
parents 7fa520b85244
children 5861cc1f5704
comparison
equal deleted inserted replaced
25140:c92e6b6d3588 25141:99f6087a5fd2
679 var lines =<< trim END 679 var lines =<< trim END
680 var Partial: func(): string = function(PartFuncBool, [true]) 680 var Partial: func(): string = function(PartFuncBool, [true])
681 assert_equal('done', Partial()) 681 assert_equal('done', Partial())
682 END 682 END
683 CheckDefAndScriptSuccess(lines) 683 CheckDefAndScriptSuccess(lines)
684
685 lines =<< trim END
686 vim9script
687 def Func(b: bool)
688 enddef
689 var Ref: func = function(Func, [true])
690 assert_equal('func()', typename(Ref))
691 Ref()
692 END
693 CheckScriptSuccess(lines)
684 enddef 694 enddef
685 695
686 def Test_assignment_list_any_index() 696 def Test_assignment_list_any_index()
687 var l: list<number> = [1, 2] 697 var l: list<number> = [1, 2]
688 for [x, y, _] 698 for [x, y, _]