0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

patch 8.2.0657: Vim9: no check if called variable is a FuncRef

Problem:    Vim9: no check if called variable is a FuncRef.
Solution:   Add a type check.
This commit is contained in:
Bram Moolenaar
2020-04-28 21:29:34 +02:00
parent 7ed8f59ae0
commit a0a9f43ab2
4 changed files with 42 additions and 6 deletions

View File

@@ -345,6 +345,9 @@ func Test_wrong_type()
call CheckDefFailure(['let var: pam'], 'E1010:')
call CheckDefFailure(['let var: sam'], 'E1010:')
call CheckDefFailure(['let var: vim'], 'E1010:')
call CheckDefFailure(['let Ref: number', 'Ref()'], 'E1085:')
call CheckDefFailure(['let Ref: string', 'let res = Ref()'], 'E1085:')
endfunc
func Test_const()