Skip to content

meta.basic: missing integer parameter for getfenv #1325

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

Closed
Bilal2453 opened this issue Jul 13, 2022 · 0 comments · Fixed by #1326
Closed

meta.basic: missing integer parameter for getfenv #1325

Bilal2453 opened this issue Jul 13, 2022 · 0 comments · Fixed by #1326
Labels
bug Something isn't working
Milestone

Comments

@Bilal2453
Copy link
Contributor

getfenv meta definition is incomplete.

---#DES 'getfenv'
---@param f? async fun()
---@return table
---@nodiscard

In here, it states that getfenv only accepts a function as its only parameter.

Meanwhile the 5.1 manual states:

Returns the current environment in use by the function. f can be a Lua function or a number that specifies the function at that stack level: Level 1 is the function calling getfenv. If the given function is not a Lua function, or if f is 0, getfenv returns the global environment. The default for f is 1.

image

@sumneko sumneko added the bug Something isn't working label Jul 13, 2022
@sumneko sumneko added this to the 3.5.0 milestone Jul 13, 2022
Bilal2453 added a commit to Bilal2453/lua-language-server that referenced this issue Jul 13, 2022
sumneko added a commit that referenced this issue Jul 13, 2022
#1325: add missing paramter type for getfenv
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants