forked from aniani/vim
patch 9.0.2019: Vim9: no support for funcrefs
Problem: Vim9: no support for funcrefs Solution: Add support for object/class funcref members closes: #11981 #12417 #12960 #12324 #13333 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
committed by
Christian Brabandt
parent
69fb5afb3b
commit
29bb67f1be
@@ -3663,6 +3663,17 @@ def Test_partial_call()
|
||||
const Call = Foo(Expr)
|
||||
END
|
||||
v9.CheckScriptFailure(lines, 'E1031:')
|
||||
|
||||
# Test for calling a partial that takes a single argument.
|
||||
# This used to produce a "E340: Internal error" message.
|
||||
lines =<< trim END
|
||||
def Foo(n: number): number
|
||||
return n * 2
|
||||
enddef
|
||||
var Fn = function(Foo, [10])
|
||||
assert_equal(20, Fn())
|
||||
END
|
||||
v9.CheckDefAndScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
def Test_partial_double_nested()
|
||||
|
||||
Reference in New Issue
Block a user