diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-10-08 14:39:36 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-10-08 14:39:36 +0100 |
commit | 0089ce293f885afc2b77f12aa110f33b2101973a (patch) | |
tree | 2f3bcd5088b4eba7d16466e5d25b3a1699604864 /src/testdir | |
parent | 4314e4f7da4db5d85f63cdf43b73be3689502c93 (diff) | |
download | vim-git-0089ce293f885afc2b77f12aa110f33b2101973a.tar.gz |
patch 9.0.0695: failing check for dictionary type for const anyv9.0.0695
Problem: Failing check for dictionary type for const any.
Solution: Check for any type properly. (closes #11310)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_vim9_script.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim index fd07fbfae..8a4fd3b6c 100644 --- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -297,6 +297,14 @@ def Test_const() constdict->assert_equal({one: 1, two: {five: 55, six: 66}, three: 3}) END v9.CheckDefAndScriptSuccess(lines) + + # "any" type with const flag is recognized as "any" + lines =<< trim END + const dict: dict<any> = {foo: {bar: 42}} + const foo = dict.foo + assert_equal(v:t_number, type(foo.bar)) + END + v9.CheckDefAndScriptSuccess(lines) enddef def Test_const_bang() |