summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-07 19:28:08 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-07 19:28:08 +0200
commit95dd9f2571f09a915674133c73b471b0ebbdcdbf (patch)
treeada5cf7b524ef8b0a2b58e8f30e7298f9d6912bb /src/testdir
parent994b89d28dc54c896e00eba66e247addb0540272 (diff)
downloadvim-git-95dd9f2571f09a915674133c73b471b0ebbdcdbf.tar.gz
patch 8.2.1387: Vim9: cannot assign to single letter variable with typev8.2.1387
Problem: Vim9: cannot assign to single letter variable with type. Solution: Exclude the colon from the variable name. (closes #6647)
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_vim9_script.vim11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim
index e5d5e872d..ba18af09e 100644
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -449,6 +449,17 @@ def Test_assignment_vim9script()
@+ = 'plus'
assert_equal('plus', @+)
endif
+
+ let a: number = 123
+ assert_equal(123, a)
+ let s: string = 'yes'
+ assert_equal('yes', s)
+ let b: number = 42
+ assert_equal(42, b)
+ let w: number = 43
+ assert_equal(43, w)
+ let t: number = 44
+ assert_equal(44, t)
END
CheckScriptSuccess(lines)
enddef