diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-01-17 16:57:36 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-01-17 16:57:36 +0800 |
commit | 505f8de67ce7759e6321017abbd69f1d4799e8b1 (patch) | |
tree | 381159859043ef9bc6b05dda9a5e0749ba0bb8b7 /test | |
parent | 6c89b0a55de7e47c9300b4f42421d8f45433da4c (diff) | |
download | lua-language-server-505f8de67ce7759e6321017abbd69f1d4799e8b1.zip |
don't check `duplicate-set-field` in different if
Diffstat (limited to 'test')
-rw-r--r-- | test/diagnostics/common.lua | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua index b91380b8..89537771 100644 --- a/test/diagnostics/common.lua +++ b/test/diagnostics/common.lua @@ -2231,3 +2231,34 @@ mt.init = function () obj.x = 1 end ]] + +TEST [[ +---@class A +X = {} + +function <!X.f!>() end + +function <!X.f!>() end +]] + +TEST [[ +---@meta + +---@class A +X = {} + +function X.f() end + +function X.f() end +]] + +TEST [[ +---@class A +X = {} + +if true then + function X.f() end +else + function X.f() end +end +]] |