Mercurial > vim
diff src/testdir/test_vim9_class.vim @ 35068:60a7fae99560 v9.1.0378
patch 9.1.0378: Vim9: no comments allowed after class vars
Commit: https://github.com/vim/vim/commit/fe55c31752acae5a02cd5274fb81965fd41bbcc7
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Sun Apr 28 09:54:09 2024 +0200
patch 9.1.0378: Vim9: no comments allowed after class vars
Problem: Vim9: no comments allowed after class vars
(Christian Robinson, after 9.1.376)
Solution: Allow trailing comments after class vars
(Yegappan Lakshmanan)
closes: #14651
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 28 Apr 2024 10:00:06 +0200 |
parents | f57990be7526 |
children | 30cc85d355c1 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_class.vim +++ b/src/testdir/test_vim9_class.vim @@ -103,6 +103,18 @@ def Test_class_basic() END v9.CheckSourceFailure(lines, "E488: Trailing characters: | var y = 10", 3) + # Comments are allowed after an inline block + lines =<< trim END + vim9script + class Foo + static const bar = { # {{{ + baz: 'qux' + } # }}} + endclass + assert_equal({baz: 'qux'}, Foo.bar) + END + v9.CheckSourceSuccess(lines) + # Try to define a class with the same name as an existing variable lines =<< trim END vim9script