diff options
author | uhziel <uhziel@gmail.com> | 2020-12-15 14:53:59 +0800 |
---|---|---|
committer | uhziel <uhziel@gmail.com> | 2020-12-15 14:53:59 +0800 |
commit | 8e55293116809cd46c9f3dce7c972e8ee77af840 (patch) | |
tree | 487da1bb0a1b0980870dbab7309fd2f026954b4b /test/diagnostics/init.lua | |
parent | e7df5a89d015dacd613cc9cdeb7539386884a3eb (diff) | |
parent | f3ec5825e3c6a8090a020097e088f26718c316bb (diff) | |
download | lua-language-server-8e55293116809cd46c9f3dce7c972e8ee77af840.zip |
Merge branch 'master' into diagnostic-undefined-field
Diffstat (limited to 'test/diagnostics/init.lua')
-rw-r--r-- | test/diagnostics/init.lua | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua index 3f3c563c..cfd0f4cb 100644 --- a/test/diagnostics/init.lua +++ b/test/diagnostics/init.lua @@ -847,20 +847,20 @@ local mt2 = {} local v print(v.field1 + 1) print(v.field2 + 1) -print(<!v.field3!> + 1) +print(v.<!field3!> + 1) print(v:method1()) print(v.method2()) -print(<!v:method3!>()) +print(v:<!method3!>()) ---@type Bar local v2 print(v2.field1 + 1) print(v2.field2 + 1) -print(<!v2.field3!> + 1) +print(v2.<!field3!> + 1) print(v2.field4 + 1) print(v2:method1()) print(v2.method2()) -print(<!v2:method3!>()) +print(v2:<!method3!>()) local v3 = {} print(v3.abc) @@ -880,7 +880,7 @@ function Foo:method1() end ---@type Foo local v v:method1() -<!v:method2!>() -- doc.class.name +v:<!method2!>() -- doc.class.name ]] -- checkUndefinedField 通过type找到class,涉及到 class 继承版 @@ -895,7 +895,7 @@ function Bar:method3() end ---@type Bar local v v:method1() -<!v:method2!>() -- doc.class.name +v:<!method2!>() -- doc.class.name v:method3() ]] @@ -904,8 +904,8 @@ TEST [[ ---@class Foo local Foo function Foo:method1() end -<!Foo:method2!>() -- doc.class -<!Foo:method2!>() -- doc.class +Foo:<!method2!>() -- doc.class +Foo:<!method2!>() -- doc.class ]] -- checkUndefinedField 没有@class的不检测 @@ -921,9 +921,9 @@ TEST [[ ---@class Foo local mt function mt:method1() - <!mt.method2!>() -- doc.class + mt.<!method2!>() -- doc.class self.method1() - return <!self.method2!>() -- doc.class.name + return self.<!method2!>() -- doc.class.name end ]] |