diff src/testdir/test_vim9_cmd.vim @ 24049:fc4c2beea99a v8.2.2566

patch 8.2.2566: Vim9: Function name is not recognized Commit: https://github.com/vim/vim/commit/2e2d758902dc08a0e383fe6b198e11dd14f1bdf8 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 3 21:22:41 2021 +0100 patch 8.2.2566: Vim9: Function name is not recognized Problem: Vim9: Function name is not recognized. Solution: Change lookup_scriptvar() to also find function names. (closes #7770)
author Bram Moolenaar <Bram@vim.org>
date Wed, 03 Mar 2021 21:30:03 +0100
parents 09bde146adcb
children 780dec2ffa6b
line wrap: on
line diff
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -371,6 +371,24 @@ def Test_method_call_linebreak()
   MethodAfterLinebreak('foobar')
   assert_equal('foobar', getline(1))
   bwipe!
+
+  lines =<< trim END
+      vim9script
+      def Foo(): string
+          return '# some text'
+      enddef
+
+      def Bar(F: func): string
+          return F()
+      enddef
+
+      Foo
+         ->Bar()
+         ->setline(1)
+  END
+  CheckScriptSuccess(lines)
+  assert_equal('# some text', getline(1))
+  bwipe!
 enddef
 
 def Test_method_call_whitespace()