summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-17 04:24:44 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-17 04:24:44 +0800
commitfbb028fa8ac1c1d146e4e6aecda03442af9ddee8 (patch)
treebd0e28e93525f9f95754800f118d77c8ae8cecc9 /test
parent103d77b9789d0e9d420479dd7b746827ce79e3da (diff)
downloadlua-language-server-fbb028fa8ac1c1d146e4e6aecda03442af9ddee8.zip
fix optional
Diffstat (limited to 'test')
-rw-r--r--test/hover/init.lua2
-rw-r--r--test/type_inference/init.lua7
2 files changed, 8 insertions, 1 deletions
diff --git a/test/hover/init.lua b/test/hover/init.lua
index ee66ef2b..1a05d78e 100644
--- a/test/hover/init.lua
+++ b/test/hover/init.lua
@@ -772,7 +772,7 @@ local <?t?> = {
]]
[[
local t: {
- f: file*,
+ f: file*?,
}
]]
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 9ead2861..ca3027fe 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -1482,3 +1482,10 @@ function mt:f()
print(<?self?>)
end
]]
+
+TEST 'string?' [[
+---@return string?
+local function f() end
+
+local <?x?> = f()
+]]