summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-06-24 21:01:50 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-06-24 21:01:50 +0800
commit002ebe37bdc749b527dc6040a4512a3714334862 (patch)
treeda02e3482b30c0ee0ef3f52ea213527c8a77c715
parent55bc394b5c8cc41380ff7e26729e850ecadde7ed (diff)
downloadlua-language-server-002ebe37bdc749b527dc6040a4512a3714334862.zip
fix
-rw-r--r--script/core/infer.lua2
-rw-r--r--test/type_inference/init.lua5
2 files changed, 6 insertions, 1 deletions
diff --git a/script/core/infer.lua b/script/core/infer.lua
index ddf51d76..03bdd440 100644
--- a/script/core/infer.lua
+++ b/script/core/infer.lua
@@ -395,7 +395,7 @@ function m.viewDocFunction(doc)
for i, rtn in ipairs(doc.returns) do
returns[i] = m.viewDocName(rtn)
end
- label = ('%s:%s'):format(label, table.concat(returns))
+ label = ('%s:%s'):format(label, table.concat(returns, ', '))
end
return label
end
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 0ea6b96c..f2fd8dd7 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -822,3 +822,8 @@ local t = {'a', 'b'}
for k, <?v?> in pairs(t) do
end
]]
+
+TEST 'fun():number, boolean' [[
+---@type fun():number, boolean
+local <?t?>
+]]