mirror of
https://github.com/vim/vim.git
synced 2025-10-03 05:14:07 -04:00
patch 8.2.4114: Vim9: type checking for a funcref does not work for method
Problem: Vim9: type checking for a funcref does not work for when it is used in a method. Solution: Pass the base to where the type is checked.
This commit is contained in:
@@ -3136,6 +3136,14 @@ def Test_expr7_method_call()
|
||||
var sorted = [3, 1, 2]
|
||||
-> sort()
|
||||
assert_equal([1, 2, 3], sorted)
|
||||
|
||||
def SetNumber(n: number)
|
||||
g:number = n
|
||||
enddef
|
||||
const Setit = SetNumber
|
||||
len('text')->Setit()
|
||||
assert_equal(4, g:number)
|
||||
unlet g:number
|
||||
END
|
||||
CheckDefAndScriptSuccess(lines)
|
||||
|
||||
|
Reference in New Issue
Block a user