Skip to content

Conversation

xuhuanzy
Copy link
Member

@xuhuanzy xuhuanzy commented Mar 23, 2025

fixes #242
fixes #249

只允许定义一次, 用于快速声明类的字段
```lua
---@Class AAAA
---@field value any
local AAAA = {}

---@Package
---@return AAAA
function AAAA.new()
    ---@Class (constructor) AAAA
    local self = {
        _value = nil,
    }
    return setmetatable(self, AAAA)
end

---@type AAAA
local a
print(a._value)
```
@CppCXY CppCXY merged commit ddcae6e into EmmyLuaLs:main Mar 24, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

expected 2 parameters but found 1 class constructors (2)

2 participants