diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-12-11 17:01:22 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-12-11 17:01:22 +0800 |
commit | e3486e01e820b2d61bf28e57277479ee59ab94b9 (patch) | |
tree | fd023532fc7c8b785a9f33083e0b9ec908f15214 /test-beta/diagnostics/init.lua | |
parent | ee4396dce24c8fd004d1a53a80328cf573809af9 (diff) | |
download | lua-language-server-e3486e01e820b2d61bf28e57277479ee59ab94b9.zip |
修正未引用变量的bug
Diffstat (limited to 'test-beta/diagnostics/init.lua')
-rw-r--r-- | test-beta/diagnostics/init.lua | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/test-beta/diagnostics/init.lua b/test-beta/diagnostics/init.lua index 0a38bce9..9ed22b1f 100644 --- a/test-beta/diagnostics/init.lua +++ b/test-beta/diagnostics/init.lua @@ -70,11 +70,26 @@ local <!x!> ]] TEST [[ +local x <close> +]] + +TEST [[ local function x() end x() ]] +TEST [[ +return function (x) + x.a = 1 +end +]] + +TEST [[ +local <!t!> = {} +<!t!>.a = 1 +]] + TEST([[ <!local function x() end!> @@ -91,7 +106,7 @@ local <!x!> = <!function () end!> TEST [[ local <!x!> -x = <!function () end!> +<!x!> = <!function () end!> ]] @@ -338,18 +353,18 @@ return mt TEST [[ local <!mt!> = {} -function mt:f() +function <!mt!>:f() end ]] TEST [[ local <!x!> = {} -x.a = 1 +<!x!>.a = 1 ]] TEST [[ local <!x!> = {} -x['a'] = 1 +<!x!>['a'] = 1 ]] TEST [[ @@ -541,7 +556,7 @@ end TEST [[ local <!t!> = {} -t[1] = 1 +<!t!>[1] = 1 ]] --TEST [[ |