lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

定义泛型函数对于指定了泛型类型的参数插件无法识别该参数的类型,不能提示出该类型的正确成员

Open zzyAZU opened this issue 1 year ago • 0 comments

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Annotations

Expected Behaviour

插件应该识别 testfun 函数 参数 p 有 p1 的字段

Actual Behaviour

插件无法识别 testfun 函数 参数 p 有 p1 字段

Reproduction steps

---@class TestTP ---@field p1 string ---@field p2 number

---@generic T: TestTP ---@param p T function testfun(p) print(p.p1) end

Additional Notes

No response

Log File

No response

zzyAZU avatar Apr 26 '24 02:04 zzyAZU