diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-02-10 18:08:19 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-02-10 18:08:19 +0800 |
commit | 3154cef2313eb5ec7e067571f7ff6438b8a26ced (patch) | |
tree | 468bc1be0b3f693449e7906267989e80a5db8997 /test/type_inference | |
parent | 4943e05d47dd2b5a572b30a2ddbb7b886fe2b05b (diff) | |
download | lua-language-server-3154cef2313eb5ec7e067571f7ff6438b8a26ced.zip |
fix #1887
Diffstat (limited to 'test/type_inference')
-rw-r--r-- | test/type_inference/init.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 4e3c9d5b..87e6c490 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -4219,3 +4219,17 @@ end function Y() end ]] + +TEST 'A_Class' [[ +---@class A_Class +local A = { x = 5 } + +function A:func() + for i = 1, <?self?>.x do + print(i) + end + + self.y = 3 + self.y = self.y + 3 +end +]] |