diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-23 02:57:13 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-23 02:57:13 +0800 |
commit | 838ce36fdd7abdff0b4cab5e67c2500325178805 (patch) | |
tree | bffd74f604cbcf666ca5d41d1c9f5750e48e1db9 /test/type_inference/init.lua | |
parent | 0ff98557a45c25d7a49520e57f49561a62300f35 (diff) | |
download | lua-language-server-838ce36fdd7abdff0b4cab5e67c2500325178805.zip |
update
Diffstat (limited to 'test/type_inference/init.lua')
-rw-r--r-- | test/type_inference/init.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 254320e4..bca3a546 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -3007,3 +3007,12 @@ local x = true local y = x--[[@as integer]] --is `integer` here local z = <?x?>--[[@as string]] --is `true` here ]=] + +TEST 'integer' [[ +---@type integer +local x + +if type(x) == 'number' then + print(<?x?>) +end +]] |