Skip to content

Commit a12edb0

Browse files
authored
Merge pull request #3386 from haithium/master
fix: stdlib success return types
2 parents 5e10c03 + 763a34f commit a12edb0

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* `FIX` Fix type inference for bitwise operators (`<<`, `>>`, `&`, `|`, `~`) on integer variables
99
* `FIX` Fix constant value computation for chained bitwise expressions in hover tooltips
1010
* `FIX` Support Lua 5.5 prefix local attributes such as `local <close>x` and `local <const>x`
11+
* `FIX` Correct `os` and `io` meta return types.
1112

1213
## 3.17.1
1314
`2026-01-20`

meta/template/io.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ io = {}
2626

2727
---#DES 'io.close'
2828
---@param file? file*
29-
---@return boolean? suc
29+
---@return true? suc
3030
---@return exitcode? exitcode
3131
---@return integer? code
3232
function io.close(file) end
@@ -119,7 +119,7 @@ local file = {}
119119
---@alias exitcode "exit"|"signal"
120120

121121
---#DES 'file:close'
122-
---@return boolean? suc
122+
---@return true? suc
123123
---@return exitcode? exitcode
124124
---@return integer? code
125125
function file:close() end

meta/template/os.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function os.difftime(t2, t1) end
5050
function os.execute(command) end
5151
---#else
5252
---@param command? string
53-
---@return boolean? suc
53+
---@return true? suc
5454
---@return exitcode? exitcode
5555
---@return integer? code
5656
function os.execute(command) end
@@ -75,15 +75,17 @@ function os.getenv(varname) end
7575

7676
---#DES 'os.remove'
7777
---@param filename string
78-
---@return boolean suc
78+
---@return true? suc
7979
---@return string? errmsg
80+
---@return integer? errcode
8081
function os.remove(filename) end
8182

8283
---#DES 'os.rename'
8384
---@param oldname string
8485
---@param newname string
85-
---@return boolean suc
86+
---@return true? suc
8687
---@return string? errmsg
88+
---@return integer? errcode
8789
function os.rename(oldname, newname) end
8890

8991
---@alias localecategory

0 commit comments

Comments
 (0)