diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-12 17:56:50 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-12 17:56:50 +0800 |
commit | ee7ddabf22768c57952e89098db9ffea84475ff7 (patch) | |
tree | 86f7e07c92a1925e9953eaef1755a410ed772f11 /server/test/type_inference | |
parent | 94da0c9d659f7ac01bf75ccdc37f236e90f8900a (diff) | |
download | lua-language-server-ee7ddabf22768c57952e89098db9ffea84475ff7.zip |
支持函数返回类型
Diffstat (limited to 'server/test/type_inference')
-rw-r--r-- | server/test/type_inference/init.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/server/test/type_inference/init.lua b/server/test/type_inference/init.lua index 3686451f..c906fdd4 100644 --- a/server/test/type_inference/init.lua +++ b/server/test/type_inference/init.lua @@ -108,3 +108,22 @@ TEST 'number' [[ TEST 'table' [[ <?table?>() ]] + +TEST 'string' [[ +<?x?> = _VERSION +]] + +TEST 'function' [[ +<?x?> = _VERSION.sub +]] + +TEST 'table' [[ +<?x?> = setmetatable({}) +]] + +TEST 'number' [[ +local function x() + return 1 +end +<?y?> = x() +]] |