patch 8.2.1314: Vim9: rule for comment after :function is confusing
Problem: Vim9: rule for comment after :function is confusing.
Solution: Allow double quoted comment after :function in vim9script.
(closes #6556)
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim
index 427e912..b491fa2 100644
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -2286,6 +2286,10 @@
])
CheckScriptFailure([
'vim9script',
+ 'function " comment',
+ ], 'E129:')
+ CheckScriptFailure([
+ 'vim9script',
'function# comment',
], 'E129:')
CheckScriptSuccess([
@@ -2333,11 +2337,11 @@
'func Test() " comment',
'endfunc',
])
- CheckScriptFailure([
+ CheckScriptSuccess([
'vim9script',
'func Test() " comment',
'endfunc',
- ], 'E488:')
+ ])
CheckScriptSuccess([
'def Test() # comment',