diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-21 20:49:42 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-21 20:49:42 +0800 |
commit | 442b2d559537ed0caeb9116bf904bd93002aaa8b (patch) | |
tree | e0785189e18388332f1f90127ef6677f726bad64 /server-beta/test | |
parent | 128e0f95772c0afc43a447c039f08f13b268ad0a (diff) | |
download | lua-language-server-442b2d559537ed0caeb9116bf904bd93002aaa8b.zip |
局部变量在一定程度上向后推测类型
Diffstat (limited to 'server-beta/test')
-rw-r--r-- | server-beta/test/type_inference/init.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server-beta/test/type_inference/init.lua b/server-beta/test/type_inference/init.lua index 53ee6131..f509ca3f 100644 --- a/server-beta/test/type_inference/init.lua +++ b/server-beta/test/type_inference/init.lua @@ -176,6 +176,12 @@ TEST 'integer' [[ local y = <?x?> << 0 ]] +TEST 'integer' [[ +local function f(<?a?>, b) + return a << b +end +]] + -- 不根据调用者的输入参数来推测 --TEST 'number' [[ --local function x(a) |