diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-10 11:27:31 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-10 11:27:31 +0800 |
commit | fdc9a81f6f220a9fab4087a6a4d3eb7c346498e6 (patch) | |
tree | 0e936062e747005da62e25f0866f7c0819c90d7b /server/test/type_inference | |
parent | be6e0ee6d31d79005691b982c02e7699a7ae3762 (diff) | |
download | lua-language-server-fdc9a81f6f220a9fab4087a6a4d3eb7c346498e6.zip |
函数和表
Diffstat (limited to 'server/test/type_inference')
-rw-r--r-- | server/test/type_inference/init.lua | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/server/test/type_inference/init.lua b/server/test/type_inference/init.lua index 913228bb..c4446a51 100644 --- a/server/test/type_inference/init.lua +++ b/server/test/type_inference/init.lua @@ -34,3 +34,42 @@ local <?var?> = true TEST 'number' [[ local <?var?> = 1 ]] + +TEST 'string' [[ +local var = '111' +t.<?x?> = var +]] + +TEST 'string' [[ +local <?var?> +var = '111' +]] + +TEST 'function' [[ +function <?xx?>() +end +]] + +TEST 'function' [[ +local function <?xx?>() +end +]] + +TEST 'function' [[ +local <?xx?> +xx = function () +end +]] + +TEST 'table' [[ +local <?t?> = {} +]] + +TEST 'table' [[ +local <?t?> +t = {} +]] + +TEST 'table' [[ +<?t?>.x = 1 +]] |