summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-15 19:35:06 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-15 19:35:06 +0800
commitcc9bf965fec185dd7e23fe5fe9af512f319a1d9b (patch)
tree79042ff6b640987a84e8e5bdbaee7d1ff5c13b01 /test
parentc61eefc970c66da77a6428cf7ea1537e8719734a (diff)
downloadlua-language-server-cc9bf965fec185dd7e23fe5fe9af512f319a1d9b.zip
infer type by `local tp = type(x)`
Diffstat (limited to 'test')
-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 4d135004..3e4a910c 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -2618,3 +2618,12 @@ if type(x) == 'function' then
print(<?x?>)
end
]]
+
+TEST 'integer' [[
+local x
+local tp = type(x)
+
+if tp == 'integer' then
+ print(<?x?>)
+end
+]]