From fbb028fa8ac1c1d146e4e6aecda03442af9ddee8 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, 17 Apr 2022 04:24:44 +0800 Subject: fix optional --- test/hover/init.lua | 2 +- test/type_inference/init.lua | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/hover/init.lua b/test/hover/init.lua index ee66ef2b..1a05d78e 100644 --- a/test/hover/init.lua +++ b/test/hover/init.lua @@ -772,7 +772,7 @@ local = { ]] [[ local t: { - f: file*, + f: file*?, } ]] diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 9ead2861..ca3027fe 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -1482,3 +1482,10 @@ function mt:f() print() end ]] + +TEST 'string?' [[ +---@return string? +local function f() end + +local = f() +]] -- cgit v1.2.3