summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-03-09 14:54:49 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-03-09 14:54:49 +0800
commita9fe326bb74a35501748fe1b265d9dbf268cfe88 (patch)
tree89c275f7367d2af2c431623318444ec1ac7c5a8e /test/type_inference
parentd7d44a727087337638b3fe8ff0a45a12945b2d03 (diff)
downloadlua-language-server-a9fe326bb74a35501748fe1b265d9dbf268cfe88.zip
support `x or error(...)`
fix #1945
Diffstat (limited to 'test/type_inference')
-rw-r--r--test/type_inference/init.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 87e6c490..597fb761 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -4233,3 +4233,9 @@ function A:func()
self.y = self.y + 3
end
]]
+
+TEST 'number' [[
+---@type number?
+local n
+local <?v?> = n or error('')
+]]