From e76e59948ff86f37a7b17fa79ca7041a1dae1bf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sun, 24 Apr 2022 04:15:34 +0800 Subject: infer by `if not x or x then` --- test/type_inference/init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 052348e2..41ec3df7 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -1957,3 +1957,11 @@ local x if x and then end ]] + +TEST 'integer' [[ +---@type integer? +local x + +if not x or then +end +]] -- cgit v1.2.3