diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/type_inference/init.lua | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 91fc0eb8..97d684dc 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -1656,3 +1656,37 @@ end x = '1' x = 1 ]] + +TEST 'integer?' [[ +---@type integer? +local <?x?> +]] + +TEST 'integer?' [[ +---@type integer? +local x + +if <?x?> then + print(x) +end +]] + +TEST 'integer' [[ +---@type integer? +local x + +if x then + print(<?x?>) +end +]] + +TEST 'integer?' [[ +---@type integer? +local x + +if x then + print(x) +end + +print(<?x?>) +]] |