diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-06 16:01:05 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-06 16:01:05 +0800 |
commit | 25cae7df6bff76e6a44adf85dfef06742ebf7193 (patch) | |
tree | 8606dc8bf2d7c539206f66ee888f24cdac3c7b3c /test/type_inference | |
parent | eca994d10e4f069a4cc9348d27a4f3723a19f551 (diff) | |
download | lua-language-server-25cae7df6bff76e6a44adf85dfef06742ebf7193.zip |
dose not infer as `nil` by `t.field = nil`
Diffstat (limited to 'test/type_inference')
-rw-r--r-- | test/type_inference/init.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 8e9e134f..bae14650 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -3381,3 +3381,13 @@ TEST '{ [string]: number, [true]: string, [1]: boolean, tag: integer }' [[ ---@type {[string]: number, [true]: string, [1]: boolean, tag: integer} local <?t?> ]] + +TEST 'unknown' [[ +local mt = {} +mt.<?x?> = nil +]] + +TEST 'unknown' [[ +mt = {} +mt.<?x?> = nil +]] |