diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-03-29 02:54:44 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-03-29 02:54:44 +0800 |
commit | 529856733fdfdf87f3aec704647798a5b611f49d (patch) | |
tree | a8969ca7d7de2ea4ababd5aa639d3ee7c0245edb /test/references/all.lua | |
parent | 02eb7711f5764bd44d07c886c492f8de9a6048bf (diff) | |
download | lua-language-server-529856733fdfdf87f3aec704647798a5b611f49d.zip |
update
Diffstat (limited to 'test/references/all.lua')
-rw-r--r-- | test/references/all.lua | 87 |
1 files changed, 3 insertions, 84 deletions
diff --git a/test/references/all.lua b/test/references/all.lua index aec6e721..235e67fd 100644 --- a/test/references/all.lua +++ b/test/references/all.lua @@ -60,6 +60,8 @@ end --end --]] +-- TODO: How to search references of function? +--[=[ TEST [[ local function f() return <~<!function~> () @@ -77,26 +79,7 @@ end local _, <!f2!> = f() ]] - -config.set(nil, 'Lua.IntelliSense.traceReturn', true) -TEST [[ -local <?x?> -local function f() - return <!x!> -end -local <!y!> = f() -]] - -TEST [[ -local <?x?> -local function f() - return function () - return <!x!> - end -end -local <!y!> = f()() -]] -config.set(nil, 'Lua.IntelliSense.traceReturn', false) +]=] TEST [[ ---@class A @@ -106,22 +89,6 @@ local t local <?v?> ]] --- TODO --- 泛型的反向搜索 -do return end -TEST [[ ----@class Dog -local <?Dog?> = {} - ----@generic T ----@param type1 T ----@return T -function foobar(type1) -end - -local <!v1!> = foobar(<!Dog!>) -]] - TEST [[ ---@class Dog local Dog = {} @@ -159,51 +126,3 @@ end local v1 = Master:foobar("", Dog) v1.<!eat!>() ]] - -TEST [[ ----@class A -local <?A?> - ----@generic T ----@param self T ----@return T -function m.f(self) end - -local <!b!> = m.f(<!A!>) -]] - -TEST [[ ----@class A -local <?A?> - ----@generic T ----@param self T ----@return T -function m:f() end - -local <!b!> = m.f(<!A!>) -]] - -TEST [[ ----@class A -local <?A?> - ----@generic T ----@param self T ----@return T -function <!A!>.f(self) end - -local <!b!> = <!A!>:f() -]] - -TEST [[ ----@class A -local <?A?> - ----@generic T ----@param self T ----@return T -function <!A!>:f() end - -local <!b!> = <!A!>:f() -]] |