diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-08-06 15:55:11 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-08-06 15:55:11 +0800 |
commit | 842f98c6045f337ae30df559b451b65295f99f86 (patch) | |
tree | bb75fa33cc4e82d1e76253a9d141a9a293e403e4 /server/test/diagnostics/init.lua | |
parent | f87c508bf3a45465c01241a0502041be9b693c08 (diff) | |
download | lua-language-server-842f98c6045f337ae30df559b451b65295f99f86.zip |
修正一些bug
Diffstat (limited to 'server/test/diagnostics/init.lua')
-rw-r--r-- | server/test/diagnostics/init.lua | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/server/test/diagnostics/init.lua b/server/test/diagnostics/init.lua index e6e27dad..4a34c3db 100644 --- a/server/test/diagnostics/init.lua +++ b/server/test/diagnostics/init.lua @@ -44,7 +44,7 @@ function TEST(script) local ast = parser:ast(new_script, 'lua', 'Lua 5.3') assert(ast) local lines = parser:lines(new_script) - local vm = buildVM(ast, lsp) + local vm = buildVM(ast, lsp, 'test') assert(vm) local datas = core.diagnostics(vm, lines, 'test') local results = {} @@ -477,6 +477,14 @@ x = x or -1 TEST [[ local t = {} -t.<!a!> = 1 -t.<!a!> = 2 +function t:<!a!>() +end +function t:<!a!>() +end +]] + +TEST [[ +local t = {} +t.a = 1 +t.a = 2 ]] |