patch 8.2.1435: Vim9: always converting to string for ".." leads to mistakes

Problem:    Vim9: always converting to string for ".." leads to mistakes.
Solution:   Only automatically convert simple types.
This commit is contained in:
Bram Moolenaar
2020-08-12 21:34:49 +02:00
parent fd77748df2
commit 418f1df547
10 changed files with 157 additions and 12 deletions

View File

@ -426,11 +426,14 @@ The boolean operators "||" and "&&" do not change the value: >
2 && 0 == 0
[] && 2 == []
When using `..` for string concatenation the arguments are always converted to
string. >
When using `..` for string concatenation arguments of simple types are always
converted to string. >
'hello ' .. 123 == 'hello 123'
'hello ' .. v:true == 'hello true'
Simple types are string, float, special and bool. For other types |string()|
can be used.
In Vim9 script one can use "true" for v:true and "false" for v:false.
@ -805,6 +808,9 @@ actually needed. A recommended mechanism:
...
< This goes in .../import/someother.vim.
When compiling a `:def` function and a function in an autoload script is
encountered, the script is not loaded until the `:def` function is called.
Import in legacy Vim script ~