summaryrefslogtreecommitdiff
path: root/test/completion
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-25 01:56:00 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-25 01:56:00 +0800
commitafc5f4e128f17b70dd6f661394da1acfd924be14 (patch)
tree2823ab03cce20bcf0ed4a9d1c1f583636cdf0313 /test/completion
parent125d943a7faec97b7169d0088a12ba6a44a14c16 (diff)
downloadlua-language-server-afc5f4e128f17b70dd6f661394da1acfd924be14.zip
add completion and semantic for `@cast`
Diffstat (limited to 'test/completion')
-rw-r--r--test/completion/common.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua
index 1fc37bb5..613f9b0c 100644
--- a/test/completion/common.lua
+++ b/test/completion/common.lua
@@ -3324,3 +3324,27 @@ x.y.<??>
kind = define.CompletionItemKind.Field,
}
}
+
+TEST [[
+local xyz
+
+---@cast <??>
+]]
+{
+ {
+ label = 'xyz',
+ kind = define.CompletionItemKind.Variable,
+ },
+}
+
+TEST [[
+local xyz
+
+---@cast x<??>
+]]
+{
+ {
+ label = 'xyz',
+ kind = define.CompletionItemKind.Variable,
+ }
+}