From 896a1affdeed8304688611674df88140a5cc180e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 11 Oct 2022 21:08:12 +0800 Subject: infer definitions and types across chain exp resolve #1561 --- test/definition/luadoc.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'test/definition') diff --git a/test/definition/luadoc.lua b/test/definition/luadoc.lua index 2da10f93..c14e1242 100644 --- a/test/definition/luadoc.lua +++ b/test/definition/luadoc.lua @@ -932,4 +932,28 @@ local b.!> = b ]] +TEST [[ +---@class myClass +local myClass = { nested = {} } + +function myClass.nested.() end + +---@type myClass +local class + +class.nested.() +]] + +TEST [[ +---@class myClass +local myClass = { has = { nested = {} } } + +function myClass.has.nested.() end + +---@type myClass +local class + +class.has.nested.() +]] + config.set(nil, 'Lua.type.castNumberToInteger', true) -- cgit v1.2.3