mirror of
https://github.com/vim/vim.git
synced 2025-11-09 10:37:17 -05:00
patch 9.0.0695: failing check for dictionary type for const any
Problem: Failing check for dictionary type for const any. Solution: Check for any type properly. (closes #11310)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user