patch 8.2.2455: Vim9: key type for literal dict and indexing is inconsistent
Problem: Vim9: key type that can be used for literal dict and indexing is
inconsistent.
Solution: Allow using number and bool as key for a literal dict. (#7771)
diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt
index 7246ff8..220a19b 100644
--- a/runtime/doc/vim9.txt
+++ b/runtime/doc/vim9.txt
@@ -548,6 +548,12 @@
like in JavaScript: >
var dict = {["key" .. nr]: value}
+The key type can be string, number, bool or float. Other types result in an
+error. A number can be given with and without the []: >
+ var dict = {123: 'without', [456]: 'with'}
+ echo dict
+ {'456': 'with', '123': 'without'}
+
No :xit, :t, :append, :change or :insert ~