fix: bind variables with @class using tail comments#3044
fix: bind variables with @class using tail comments#3044sumneko merged 1 commit intoLuaLS:masterfrom
@class using tail comments#3044Conversation
8d982f6 to
762850d
Compare
|
should be fixed now @C3pa But I just found some edge cases...
in the following example: local ClassA ---@class A
local strVar ---@type string
I am thinking we have to come up with a fix to resolve it once and for all 🤔 lua-language-server/script/parser/luadoc.lua Lines 2184 to 2186 in 12013ba
What do you think? 🤔 |
762850d to
3ce90e0
Compare
|
hi @emmericp, sorry to bother you I'm trying to fix the issue mentioned in #2673, where continuous And after git blaming, I found that it is caused by the change in your PR #2502: I'm not sure why Thanks |
To be honest: I don't remember the reason behind that logic |
fixes #2673
這個是我上年最初接觸和使用 luals 時遇到的一個問題
當時由於找到繞過方式用
@type,也就解決了但是最近自某版本起
@type修正成會檢查該 class 的所有 missing field 而導致報錯。。。@class後者好像合理一些
換句話還是得解決最根本的問題:
連續多行用 tail comment 寫
@class時,無法正確 bind 到 variable最初由於不了解 luals 代碼庫,所以也沒有深究原因
現在算是稍為熟悉一點了,很快找到 fix 方式了 🙂