summaryrefslogtreecommitdiff
path: root/test/diagnostics
diff options
context:
space:
mode:
authoruhziel <uhziel@gmail.com>2020-12-10 14:27:08 +0800
committeruhziel <uhziel@gmail.com>2020-12-10 14:27:08 +0800
commitc06cda864aff2e9c17a5e71c8b48c98b8a0c7e4e (patch)
tree3fdb729ed95e4040331d67fb9e0fa2214e0658d4 /test/diagnostics
parent40485201209974f79f8ecfc8ffc12352c41b56fc (diff)
downloadlua-language-server-c06cda864aff2e9c17a5e71c8b48c98b8a0c7e4e.zip
只对类的field做undefined-field诊断,避免检测出过多干扰性问题
Diffstat (limited to 'test/diagnostics')
-rw-r--r--test/diagnostics/init.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua
index 55ee8940..27a7e5f5 100644
--- a/test/diagnostics/init.lua
+++ b/test/diagnostics/init.lua
@@ -857,6 +857,11 @@ print(v2:method1())
print(v2.method2())
print(<!v2:method3!>())
-local v1 = {}
-print(v1.abc)
+local v3 = {}
+print(v3.abc)
+
+---@class Bar2
+local mt3
+function mt3:method() return 1 end
+print(mt3:method())
]]