patch 8.2.0567: Vim9: cannot put comments halfway expressions
Problem: Vim9: cannot put comments halfway expressions.
Solution: Support # comments in many places.
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim
index 3a08344..c3e3f22 100644
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -983,10 +983,17 @@
} " comment
assert_equal({'one': 1, 'two': 2, 'three': 3}, mydict)
mydict = #{
- one: 1, " comment
- two:
- 2,
- three: 3 " comment
+ one: 1, # comment
+ two: # comment
+ 2, # comment
+ three: 3 # comment
+ }
+ assert_equal(#{one: 1, two: 2, three: 3}, mydict)
+ mydict = #{
+ one: 1,
+ two:
+ 2,
+ three: 3
}
assert_equal(#{one: 1, two: 2, three: 3}, mydict)