diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-20 15:36:09 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-20 15:36:09 +0800 |
commit | a6ed5f5845d3a859bd88c72f47bc4fa9d120b2df (patch) | |
tree | c4afeffe23e1a1b17197982186747b72bb77dd8e /test | |
parent | f86c80cf43729d09f816c2ae7c13a26d80ed1179 (diff) | |
download | lua-language-server-a6ed5f5845d3a859bd88c72f47bc4fa9d120b2df.zip |
update
Diffstat (limited to 'test')
-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 74f149e0..3a7b1227 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -296,7 +296,7 @@ end <?y?> = x() ]] -TEST 'unknown' [[ +TEST 'unknown|nil' [[ local function x() return nil return f() @@ -2707,3 +2707,15 @@ end local <?n?> = f() ]] + +TEST 'integer|nil' [[ +local function f() + if x then + return + else + return 1 + end +end + +local <?n?> = f() +]] |