From a3dc7ef44577dc4708ac7b4c329c1620770aadc3 Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 13 Jul 2016 16:49:22 +1000 Subject: vim-patch:7.4.1546 Problem: Sticky type checking is more annoying than useful. Solution: Remove the error for changing a variable type. https://github.com/vim/vim/commit/f6f32c38bf3319144a84a01a154c8c91939e7acf Note: There are a bunch of other changes to eval.txt that I believe are N/A and not related to this patch. --- runtime/doc/eval.txt | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 0ca41370e9..efb8da0cfa 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -103,18 +103,9 @@ to Float, printf() for Float to String and float2nr() for Float to Number. *E891* *E892* *E893* *E894* When expecting a Float a Number can also be used, but nothing else. - *E706* *sticky-type-checking* -You will get an error if you try to change the type of a variable. You need -to |:unlet| it first to avoid this error. String and Number are considered -equivalent though, as well are Float and Number. Consider this sequence of -commands: > - :let l = "string" - :let l = 44 " changes type from String to Number - :let l = [1, 2, 3] " error! l is still a Number - :let l = 4.4 " changes type from Number to Float - :let l = "string" " error! - - + *no-type-checking* +You will not get an error if you try to change the type of a variable. + 1.2 Function references ~ *Funcref* *E695* *E718* A Funcref variable is obtained with the |function()| function. It can be used -- cgit