From 92b2a185af2d31dd353ef8a7d57469ee9d584cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 27 Jun 2022 00:42:31 +0800 Subject: resolve #1236 custom class can extends basic class --- test/diagnostics/type-check.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/diagnostics') diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua index 711211e8..34f7a492 100644 --- a/test/diagnostics/type-check.lua +++ b/test/diagnostics/type-check.lua @@ -479,5 +479,22 @@ n = nb ]] config.set(nil, 'Lua.type.weakUnionCheck', false) +TEST [[ +---@class Option: string + +---@param x Option +local function f(x) end + +---@type Option +local x = 'aaa' + +f(x) +]] + +TEST [[ +---@type number +local = 'aaa' +]] + config.remove(nil, 'Lua.diagnostics.disable', 'unused-local') config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global') -- cgit v1.2.3