0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -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

@@ -213,6 +213,12 @@ def Test_expr4_equal()
assert_equal(true, function('g:Test_expr4_equal', [123]) == function('g:Test_expr4_equal', [123]))
assert_equal(false, function('g:Test_expr4_equal', [123]) == function('g:Test_expr4_is', [123]))
assert_equal(false, function('g:Test_expr4_equal', [123]) == function('g:Test_expr4_equal', [999]))
let OneFunc: func
let TwoFunc: func
OneFunc = function('len')
TwoFunc = function('len')
assert_equal(true, OneFunc('abc') == TwoFunc('123'))
enddef
" test != comperator