diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-24 05:25:06 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-24 05:25:06 +0800 |
commit | 24abcb32ef427ce9ed8501af2a0a01aca42e23cf (patch) | |
tree | 1101364b3bf330ac986520fd340509e75a708877 /test | |
parent | b204411a88f4c36be9e9ce2710f03f2a0295e3a6 (diff) | |
download | lua-language-server-24abcb32ef427ce9ed8501af2a0a01aca42e23cf.zip |
infer by `goto`
Diffstat (limited to 'test')
-rw-r--r-- | test/type_inference/init.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index df1f538b..fa677fa9 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -1855,6 +1855,17 @@ end print(<?x?>) ]] +TEST 'integer' [[ +---@type integer? +local x + +if not x then + goto ANYWHERE +end + +print(<?x?>) +]] + TEST 'integer' [=[ local x |