summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_partial.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_partial.vim')
-rw-r--r--src/testdir/test_partial.vim14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/test_partial.vim b/src/testdir/test_partial.vim
index 4b054b5204..b5a58f6e59 100644
--- a/src/testdir/test_partial.vim
+++ b/src/testdir/test_partial.vim
@@ -406,4 +406,18 @@ func Test_compare_partials()
call assert_false(F1 is N1)
endfunc
+func Test_partial_method()
+ func Foo(x, y, z)
+ return x + y + z
+ endfunc
+ let d = {"Fn": function('Foo', [10, 20])}
+ call assert_fails('echo 30->d.Fn()', 'E1265: Cannot use a partial here')
+ delfunc Foo
+endfunc
+
+func Test_non_callable_type_as_method()
+ let d = {"Fn": 10}
+ call assert_fails('echo 30->d.Fn()', 'E1085: Not a callable type: d.Fn')
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab