summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-23 02:57:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-23 02:57:13 +0800
commit838ce36fdd7abdff0b4cab5e67c2500325178805 (patch)
treebffd74f604cbcf666ca5d41d1c9f5750e48e1db9 /test/type_inference
parent0ff98557a45c25d7a49520e57f49561a62300f35 (diff)
downloadlua-language-server-838ce36fdd7abdff0b4cab5e67c2500325178805.zip
update
Diffstat (limited to 'test/type_inference')
-rw-r--r--test/type_inference/init.lua9
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
+]]