Mercurial > vim
diff src/testdir/test_vim9_func.vim @ 25632:c204815f3058 v8.2.3352
patch 8.2.3352: Vim9: error for nested :enddef has wrong line number
Commit: https://github.com/vim/vim/commit/4bba16d252da6f072d311f9b3ebb50101d6d2eaf
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 15 19:28:05 2021 +0200
patch 8.2.3352: Vim9: error for nested :enddef has wrong line number
Problem: Vim9: error for nested :enddef has wrong line number.
Solution: Compute the line number.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 15 Aug 2021 19:30:03 +0200 |
parents | c26eb08a0df2 |
children | 99fbffe75217 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_func.vim +++ b/src/testdir/test_vim9_func.vim @@ -630,6 +630,17 @@ def Test_nested_function() assert_equal(2, Test()) END CheckScriptSuccess(lines) + + lines =<< trim END + vim9script + def Outer() + def Inner() + echo 'hello' + enddef burp + enddef + defcompile + END + CheckScriptFailure(lines, 'E1173: Text found after enddef: burp', 3) enddef def Test_not_nested_function()