From 50e027378a627146f891ee8c5b5e838096d6f334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 17 Dec 2020 14:15:18 +0800 Subject: #306 --- test/definition/bug.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/definition') diff --git a/test/definition/bug.lua b/test/definition/bug.lua index e7158848..9eafe302 100644 --- a/test/definition/bug.lua +++ b/test/definition/bug.lua @@ -146,3 +146,9 @@ t. = t.f2 print(t.) ]] + +TEST [[ +---@type string +string.xx = '' +string.xx:() +]] -- cgit debian/1.2.3+git2.25.1-1-2-gaceb0 From 6d8dbcc0d8ae0368fd6a5f03a9b269b7396b4900 Mon Sep 17 00:00:00 2001 From: Lei Zhu Date: Mon, 21 Dec 2020 11:33:48 +0800 Subject: =?UTF-8?q?=E5=A4=84=E7=90=86luadoc=E5=9C=A8=E6=9F=90=E4=BA=9B?= =?UTF-8?q?=E6=83=85=E5=86=B5=E7=BB=91=E5=AE=9A=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/definition/luadoc.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'test/definition') diff --git a/test/definition/luadoc.lua b/test/definition/luadoc.lua index 31134135..4a23b2ac 100644 --- a/test/definition/luadoc.lua +++ b/test/definition/luadoc.lua @@ -169,3 +169,31 @@ end AAAA.a. ]] + +TEST [[ +---@class Cat +local ---hahaha +---@class Dog +local m2 +---@type Cat +local ?> +]] + +TEST [[ +---@class Cat +local --hahaha +---@class Dog +local m2 +---@type Cat +local ?> +]] + +TEST [[ +---@class Cat + local ---hahaha + + ---@class Dog + local m2 + ---@type Cat + local ?> +]] -- cgit debian/1.2.3+git2.25.1-1-2-gaceb0 From 012a762ba8b282284d9cb3d0c7848f529b3fe3e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 23 Dec 2020 17:42:08 +0800 Subject: fix #318 --- test/definition/bug.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/definition') diff --git a/test/definition/bug.lua b/test/definition/bug.lua index 9eafe302..8c446123 100644 --- a/test/definition/bug.lua +++ b/test/definition/bug.lua @@ -152,3 +152,20 @@ TEST [[ string.xx = '' string.xx:() ]] + +TEST [[ +---@class Foo +Foo = {} +function Foo:Constructor() + self. = 1 +end + +---@class Foo2: Foo +Foo2 = {} +function Foo2:Constructor() +end + +---@type Foo2 +local v +v. +]] -- cgit debian/1.2.3+git2.25.1-1-2-gaceb0