Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: osdate is not allowed in os.time #3082

Merged
merged 1 commit into from
Feb 21, 2025
Merged

fix: osdate is not allowed in os.time #3082

merged 1 commit into from
Feb 21, 2025

Conversation

Rathoz
Copy link
Contributor

@Rathoz Rathoz commented Feb 19, 2025

Using os.time() with an osdate type input is currently not allowed, only osdateparam is allowed.

---@type osdate
local date
dosomething(os.time(date))
--- Cannot assign `osdate` to parameter `osdateparam?`.
--- - `osdate` cannot match `osdateparam?`
--- - Type `osdate` cannot match `nil`
--- - Type `osdate` cannot match `osdateparam`Lua Diagnostics.(param-type-mismatch)

This simple change makes so that osdate is a child of osdateparam, and as such can be used in all curcumstances an osdateparam would be acceptable.

@sumneko sumneko merged commit 64c7084 into LuaLS:master Feb 21, 2025
10 of 11 checks passed
@Rathoz Rathoz deleted the patch-1 branch February 21, 2025 08:04
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants