diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-10-27 20:37:20 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-10-27 20:37:20 +0800 |
commit | b19c7cefcaeac4537054be2dab6f7cf4b3d7ed26 (patch) | |
tree | 5eab7e925b74b41d7567c5341f05f78145ad2d0c /test | |
parent | b6f384e930448d5259ec100117bd752802c21c7c (diff) | |
download | lua-language-server-b19c7cefcaeac4537054be2dab6f7cf4b3d7ed26.zip |
fix type-check
assign object to `nil`
Diffstat (limited to 'test')
-rw-r--r-- | test/diagnostics/type-check.lua | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua index 746d4669..6455cd66 100644 --- a/test/diagnostics/type-check.lua +++ b/test/diagnostics/type-check.lua @@ -855,15 +855,14 @@ function MyClass:new() end ]] --- TODO ---TEST [[ ------@class T ---local t = { --- x = nil ---} --- ---t.x = 1 ---]] +TEST [[ +---@class T +local t = { + x = nil +} + +t.x = 1 +]] config.remove(nil, 'Lua.diagnostics.disable', 'unused-local') config.remove(nil, 'Lua.diagnostics.disable', 'unused-function') |