LuaLS / LuaLS/lua-language-server
duplicate field error when setting a field to a function in an if/else
まだ誰も着手していません。
- 主要言語
- 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?
Windows
### What is the issue affecting?
Diagnostics/Syntax Checking
### Expected Behaviour
No duplicate field error
### Actual Behaviour

``` local t = {}
if x then
t.s = function() return 1 end
else
t.s = function() return 2 end
end
```
This is not a duplicate field and should not be an error
### Reproduction steps
``` local t = {}
if x then
t.s = function() return 1 end
else
t.s = function() return 2 end
end
```
Write that into the editor. See error as indicated above.
### Additional Notes
v3.6.4
### Log File
[file_c%3A_Users_User_AppData_Roaming_Factorio_mods_space-exploration.log](https://github.com/sumneko/lua-language-server/files/10316714/file_c.3A_Users_User_AppData_Roaming_Factorio_mods_space-exploration.log)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供された条件付き代入のスニペットを使用して Visual Studio Code 拡張機能で診断を再現し、Diagnostics/Syntax Checking エントリポイントに焦点を当てます。2 つの分岐の代入が重複フィールドとして報告される理由を追跡し、その後、同じ例でエラーが発生しなくなったことを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 45/100