From 418f1df54763b79600db1c91c880fbc1007b2e1f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Aug 2020 21:34:49 +0200 Subject: 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. --- runtime/doc/vim9.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'runtime/doc/vim9.txt') diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt index 7c4a64f972..f9fd1367dd 100644 --- a/runtime/doc/vim9.txt +++ b/runtime/doc/vim9.txt @@ -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 ~ -- cgit v1.2.3