Mercurial > vim
comparison src/testdir/test_vim9_func.vim @ 26205:9e5e331828da v8.2.3634
patch 8.2.3634: error for already defined function uses wrong line number
Commit: https://github.com/vim/vim/commit/d604d78e7b2e63d118814d0fa0b4b702ec52aeed
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 20 21:46:20 2021 +0000
patch 8.2.3634: error for already defined function uses wrong line number
Problem: Error for already defined function uses wrong line number.
Solution: Set SOURCING_LNUM before giving the error message. (closes https://github.com/vim/vim/issues/9085)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 20 Nov 2021 23:00:04 +0100 |
parents | a968027f8a2c |
children | 3841da4eac23 |
comparison
equal
deleted
inserted
replaced
26204:b22360f54fad | 26205:9e5e331828da |
---|---|
739 echo 'inner' | 739 echo 'inner' |
740 enddef | 740 enddef |
741 enddef | 741 enddef |
742 defcompile | 742 defcompile |
743 END | 743 END |
744 CheckScriptFailure(lines, "E1073:") | 744 CheckScriptFailure(lines, "E1073:", 1) |
745 | |
746 lines =<< trim END | |
747 vim9script | |
748 def Func() | |
749 echo 'script' | |
750 enddef | |
751 def Func() | |
752 echo 'script' | |
753 enddef | |
754 END | |
755 CheckScriptFailure(lines, "E1073:", 5) | |
745 enddef | 756 enddef |
746 | 757 |
747 def DefListAll() | 758 def DefListAll() |
748 def | 759 def |
749 enddef | 760 enddef |