diff options
-rw-r--r-- | script/core/infer.lua | 2 | ||||
-rw-r--r-- | test/type_inference/init.lua | 5 |
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?> +]] |