diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-18 01:45:57 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-18 01:45:57 +0800 |
commit | bc4e205a4953a7f3a99bafc9fc88295f929beab1 (patch) | |
tree | ef92cc3c1438dd292a6df754af53df5d805f1a53 /test/type_inference/init.lua | |
parent | 5099d8be7125b948691d099b0e0084a72620293b (diff) | |
download | lua-language-server-bc4e205a4953a7f3a99bafc9fc88295f929beab1.zip |
update
Diffstat (limited to 'test/type_inference/init.lua')
-rw-r--r-- | test/type_inference/init.lua | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index aa424d9c..d706798b 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -2347,7 +2347,7 @@ end print(t) ]] -TEST 'table|unknown' [[ +TEST 'table' [[ local function f() if x then return y @@ -2687,3 +2687,15 @@ t.x = f() print(t.<?x?>) ]] + +TEST 'integer' [[ +local function f() + if X then + return X + else + return 1 + end +end + +local <?n?> = f() +]] |