LuaLS / LuaLS/lua-language-server
Adding an overload to an @class changes the result and gives type errors.
まだ誰も着手していません。
- 主要言語
- Lua
- スター
- 4.4k
- フォーク
- 442
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Linux
What is the issue affecting?
Type Checking
Expected Behaviour
Adding an Overload under ---@class should not change anything about how the type is handled.
Actual Behaviour
Here we have a class declaration and it's exactly how I want.
Adding an overload for the constructor generates warnings? Doesn't really make any sense.
Reproduction steps
Use ---@class to define a class.
Add ---@overload.
Make sure the class library you're using returns anything but any when extending or creating a new class.
Additional Notes
No response
Log File
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ペイロードにはソースファイルもテストも示されていないため、まず Visual Studio Code 拡張機能で Lua の ---@class 宣言と ---@overload を使ってこのケースを再現し、その後、overload の有無による型チェック結果を比較します。関係するクラスとコンストラクターの処理を追跡し、overload を追加しても有効な型の扱いが変わらず、報告された警告も発生しなくなった時点で、この問題は解決したものとします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua, vscode
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100