Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<!-- Add all new changes here. They will be moved under a version at release -->
* `FIX` Correct `math.type` meta return annotation to use `nil` instead of the string literal `'nil'`
* `FIX` Fix initial `nameStyle.config` not getting loaded in the appropriate workspace.
* `FIX` string.match and string.gmatch may return `string|integer?` [#3357](https://github.com/LuaLS/lua-language-server/issues/3357)

## 3.18.2
* `CHG` `duplicate-set-field` diagnostic now supports linked suppression: when any occurrence of a duplicate field is suppressed with `---@diagnostic disable` or `---@diagnostic disable-next-line`, all warnings for that field name will be suppressed
Expand Down
6 changes: 3 additions & 3 deletions meta/template/string.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ function string.format(s, ...) end
---#if VERSION <= 5.3 then
---@param s string|number
---@param pattern string|number
---@return fun():string, ...
---@return fun():string|integer?, ...
---@nodiscard
function string.gmatch(s, pattern) end
---#else
---@param s string|number
---@param pattern string|number
---@param init? integer
---@return fun():string, ...
---@return fun():string|integer?, ...
function string.gmatch(s, pattern, init) end
---#end

Expand Down Expand Up @@ -91,7 +91,7 @@ function string.lower(s) end
---@param s string|number
---@param pattern string|number
---@param init? integer
---@return any ...
---@return string|integer? ...
---@nodiscard
function string.match(s, pattern, init) end

Expand Down
Loading