Skip to content

fix: another regression related to type narrow and generic since v3.10.1 #3088

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

Merged
merged 2 commits into from
Mar 10, 2025

Conversation

tomlau10
Copy link
Contributor

@tomlau10 tomlau10 commented Feb 23, 2025

fixes #3087
debugging and explanation: #3087 (comment)

中文版

  • 3.10.18ecec08 的改動應該是有問題
    目前出現另1個 regression issue 跟這改動有關
  • 具體問題原因我還沒搞清楚
    不過現在回看,該 fix 實際上過於複雜了 😂
  • 8ecec08 是為了修正 script\vm\compiler.lua:2023: attempt to index a nil value #2776
    而 issue 2776 的主要問題,似單純是 如果某 arg node 已經 compile 過,說明在相同 callstack 後邊需要被引用
    => 不能單純做 remove,否則會導致 error: index nil value
    => 換句話其實在 remove 後直接 recompile 一次應該就可以 🤔

@sumneko sumneko merged commit 0ca5572 into LuaLS:master Mar 10, 2025
11 checks passed
@tomlau10 tomlau10 deleted the fix/func_type_narrow_regression branch March 16, 2025 14:07
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overloaded methods do not properly return a generic bound to the self parameter
2 participants