diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-12-05 11:02:02 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-12-05 11:02:02 +0800 |
commit | 31a4c20b3597cdf07e4b4e3ddbfeb2181a1e1559 (patch) | |
tree | 53b880dce6049f7a89d24581d1d718cc717046ee /test | |
parent | acf1fe450e713911c6d0b9f60a0f0b81a2fce143 (diff) | |
download | lua-language-server-31a4c20b3597cdf07e4b4e3ddbfeb2181a1e1559.zip |
fix #276 dont share crossMethodMark
Diffstat (limited to 'test')
-rw-r--r-- | test/references/init.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/references/init.lua b/test/references/init.lua index 4673d2f8..22afc8ac 100644 --- a/test/references/init.lua +++ b/test/references/init.lua @@ -302,3 +302,24 @@ TEST [[ ---@return <?any?> function f() end ]] + +TEST [[ +---@class Dog +local mt = {} +function mt:<?eat?>() +end + +---@class Master +local mt2 = {} +function mt2:init() + ---@type Dog + local foo = self:doSomething() + ---@type Dog + self.dog = getDog() +end +function mt2:feed() + self.dog:<!eat!>() +end +function mt2:doSomething() +end +]] |