diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-22 21:03:50 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-22 21:03:50 +0800 |
commit | 30f1cea83c4d88775932dc4bc8c12b9c74ecfb19 (patch) | |
tree | 5f0e466931573e5d9e4da80f25b8355697de8cd4 /test/type_inference | |
parent | cdb6c06ca2983f1caf1a0964997c8c44ea784b27 (diff) | |
download | lua-language-server-30f1cea83c4d88775932dc4bc8c12b9c74ecfb19.zip |
display optional field in table
Diffstat (limited to 'test/type_inference')
-rw-r--r-- | test/type_inference/init.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 7a4fb754..e7560a12 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -1795,3 +1795,18 @@ TEST 'integer' [[ local x = 1 x = <?x?> ]] + +TEST 'integer?' [[ +---@class A +---@field x? integer +local t + +t.<?x?> +]] + +TEST 'integer?' [[ +---@type { x?: integer } +local t + +t.<?x?> +]] |