summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-17 16:02:39 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-17 16:02:39 +0800
commit1bcadf492c4ccc19d137ffac80b0e9ca181a9ad7 (patch)
treedb21c17b1b6f18d3fb60920a5d0783aaf50e8d0a /test
parentcbb4bea9cabfa3073b39e067ea2114946c1d1690 (diff)
parent6fbe324f7130c94046ce14eee2235b663b47eafc (diff)
downloadlua-language-server-1bcadf492c4ccc19d137ffac80b0e9ca181a9ad7.zip
Merge branch 'master' into type-check
Diffstat (limited to 'test')
-rw-r--r--test/crossfile/completion.lua29
-rw-r--r--test/diagnostics/common.lua12
2 files changed, 14 insertions, 27 deletions
diff --git a/test/crossfile/completion.lua b/test/crossfile/completion.lua
index 79762646..4e573c0e 100644
--- a/test/crossfile/completion.lua
+++ b/test/crossfile/completion.lua
@@ -5,36 +5,11 @@ local platform = require 'bee.platform'
local util = require 'utility'
local config = require 'config'
local catch = require 'catch'
+local define = require 'proto.define'
rawset(_G, 'TEST', true)
-local CompletionItemKind = {
- Text = 1,
- Method = 2,
- Function = 3,
- Constructor = 4,
- Field = 5,
- Variable = 6,
- Class = 7,
- Interface = 8,
- Module = 9,
- Property = 10,
- Unit = 11,
- Value = 12,
- Enum = 13,
- Keyword = 14,
- Snippet = 15,
- Color = 16,
- File = 17,
- Reference = 18,
- Folder = 19,
- EnumMember = 20,
- Constant = 21,
- Struct = 22,
- Event = 23,
- Operator = 24,
- TypeParameter = 25,
-}
+local CompletionItemKind = define.CompletionItemKind
local EXISTS = {}
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua
index f80aee0a..39839c2a 100644
--- a/test/diagnostics/common.lua
+++ b/test/diagnostics/common.lua
@@ -1603,6 +1603,18 @@ f1(f2())
]]
TEST [[
+---@meta
+
+---@type fun():integer
+local f
+
+---@param x integer
+local function foo(x) end
+
+foo(f())
+]]
+
+TEST [[
---@diagnostic disable: unused-local
local x = 0