diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-04-18 17:35:22 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2024-04-18 17:35:22 +0800 |
commit | e1e7926500c28026f358b40d0e512279b65fb34f (patch) | |
tree | f9bf4fc669b49229c977cf486d43cd405f9029cb | |
parent | 3767771e8371ae837106e9885de2ce851165cf1b (diff) | |
download | lua-language-server-e1e7926500c28026f358b40d0e512279b65fb34f.zip |
`merge` 改叫 `partial`
-rw-r--r-- | changelog.md | 6 | ||||
-rw-r--r-- | script/core/diagnostics/duplicate-doc-alias.lua | 2 | ||||
-rw-r--r-- | test/diagnostics/duplicate-doc-alias.lua | 6 | ||||
-rw-r--r-- | test/type_inference/init.lua | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/changelog.md b/changelog.md index 50e719d8..cf834a55 100644 --- a/changelog.md +++ b/changelog.md @@ -1,11 +1,11 @@ # changelog ## 3.7.5 -* `NEW` alias and enums supports attribute `merge` +* `NEW` alias and enums supports attribute `partial` ```lua ---@alias Animal Cat - ---@alias(merge) Animal Dog + ---@alias(partial) Animal Dog ---@type Animal local animal --> animal is `Cat|Dog` here @@ -19,7 +19,7 @@ FATAL = 2, } - ---@enum(key, merge) ErrorCodes + ---@enum(key, partial) ErrorCodes local codes2 = { WARN = 3, INFO = 4, diff --git a/script/core/diagnostics/duplicate-doc-alias.lua b/script/core/diagnostics/duplicate-doc-alias.lua index 6d8593ca..7f71b63b 100644 --- a/script/core/diagnostics/duplicate-doc-alias.lua +++ b/script/core/diagnostics/duplicate-doc-alias.lua @@ -37,7 +37,7 @@ return function (uri, callback) finish = otherDoc.finish, uri = guide.getUri(otherDoc), } - merged[name] = merged[name] or vm.docHasAttr(otherDoc, 'merge') + merged[name] = merged[name] or vm.docHasAttr(otherDoc, 'partial') end end end diff --git a/test/diagnostics/duplicate-doc-alias.lua b/test/diagnostics/duplicate-doc-alias.lua index 5a208e3e..e518ffc6 100644 --- a/test/diagnostics/duplicate-doc-alias.lua +++ b/test/diagnostics/duplicate-doc-alias.lua @@ -11,11 +11,11 @@ TEST [[ TEST [[ ---@alias A integer ----@alias(merge) A integer +---@alias(partial) A integer ---@enum B ----@enum(merge) B +---@enum(partial) B ---@enum(key) C ----@enum(key, merge) C +---@enum(key, partial) C ]] diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 093cfb1e..da4590a6 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -4338,7 +4338,7 @@ local <?x?> = f() TEST 'boolean|number' [[ ---@alias A number ----@alias(merge) A boolean +---@alias(partial) A boolean ---@type A local <?x?> |