summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-01-09 20:14:02 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-01-09 20:14:02 +0800
commit6f889136264e39a9c47e8cce569274414c9b4a50 (patch)
treeccfa83257aeec26c03ad42c10e0ddac459d48acf /test
parent1ca3b7d67c0c30af1f67fae71b5c770b9008e4d5 (diff)
downloadlua-language-server-6f889136264e39a9c47e8cce569274414c9b4a50.zip
cast global
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 db1d306e..7cfc7fe9 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -4157,3 +4157,12 @@ if type(X) ~= 'number' then
print(<?X?>)
end
]]
+
+TEST 'boolean' [[
+---@type number
+X = Y
+
+---@cast X boolean
+
+print(<?X?>)
+]]