diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-12-03 16:49:43 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-12-03 16:49:46 +0800 |
commit | 07d99d97c0612608829d001b80773b1619de9a90 (patch) | |
tree | 791e6ede2cd14e426e4401de52e842ee35fb578d /test/diagnostics/init.lua | |
parent | 696fde0354eb955ff631c985eedd076af0d72a4f (diff) | |
download | lua-language-server-07d99d97c0612608829d001b80773b1619de9a90.zip |
unbalanced-assignments
Diffstat (limited to 'test/diagnostics/init.lua')
-rw-r--r-- | test/diagnostics/init.lua | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua index 36af38b8..c05a29ae 100644 --- a/test/diagnostics/init.lua +++ b/test/diagnostics/init.lua @@ -640,6 +640,46 @@ end ]] TEST [[ +local x, <!y!>, <!z!> = 1 +print(x, y, z) +]] + +TEST [[ +local x, y, <!z!> = 1, 2 +print(x, y, z) +]] + +TEST [[ +local x, y, z = print() +print(x, y, z) +]] + +TEST [[ +local x, y, z +print(x, y, z) +]] + +TEST [[ +local x, y, z +x, <!y!>, <!z!> = 1 +print(x, y, z) +]] + +TEST [[ +X, <!Y!>, <!Z!> = 1 +]] + +TEST [[ +T = {} +T.x, <!T.y!>, <!T.z!> = 1 +]] + +TEST [[ +T = {} +T['x'], <!T['y']!>, <!T['z']!> = 1 +]] + +TEST [[ ---@class <!Class!> ---@class <!Class!> ]] |