summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-11-07 14:38:41 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-11-07 14:38:41 +0800
commit6176475e3fabd4506a8c59222d3c83dbeeb2f1eb (patch)
treeb9a027aac314ac07cb630addc07d8b707ecbf52c /test
parentb1e0cdbeb13656f1fcd6cb2d45b8095e5b511457 (diff)
downloadlua-language-server-6176475e3fabd4506a8c59222d3c83dbeeb2f1eb.zip
don't find other locals
fix #1670
Diffstat (limited to 'test')
-rw-r--r--test/crossfile/definition.lua2
-rw-r--r--test/definition/luadoc.lua2
-rw-r--r--test/highlight/init.lua13
3 files changed, 15 insertions, 2 deletions
diff --git a/test/crossfile/definition.lua b/test/crossfile/definition.lua
index ef9b5240..e924c43f 100644
--- a/test/crossfile/definition.lua
+++ b/test/crossfile/definition.lua
@@ -435,7 +435,7 @@ TEST {
{
path = 'a.lua',
content = [[
- local <!x!>
+ local x
return {
<!x!> = x,
}
diff --git a/test/definition/luadoc.lua b/test/definition/luadoc.lua
index d8b3ef60..a2605bcb 100644
--- a/test/definition/luadoc.lua
+++ b/test/definition/luadoc.lua
@@ -935,7 +935,7 @@ local a
a.__index = a
---@class B: A
-local <!b!>
+local b
b.<!<?__index?>!> = b
]]
diff --git a/test/highlight/init.lua b/test/highlight/init.lua
index 1bd6cf35..4baea6f6 100644
--- a/test/highlight/init.lua
+++ b/test/highlight/init.lua
@@ -141,3 +141,16 @@ TEST [[
<!TEST1!> = 1
TEST2 = 2
]]
+
+TEST [[
+local zing = foo
+local foo = 4
+
+local bar = {
+ <!baz!> = foo
+}
+
+bar.<!baz!> = 5
+
+print(bar.<!baz!>)
+]]