Skip to content

meta.basic: missing integer parameter for getfenv #1325

@Bilal2453

Description

@Bilal2453

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions