diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-21 17:59:31 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-21 17:59:31 +0800 |
commit | 8683ecd814c99ee6aa4fe028798a007cb96bcdad (patch) | |
tree | e3e76e8036ae0e307080466a52e9d4f67eb125ea /server/test/signature | |
parent | 4e09d04c5020970874599c48ad0af98abe8c8919 (diff) | |
download | lua-language-server-8683ecd814c99ee6aa4fe028798a007cb96bcdad.zip |
修正面向对象语法参数计算错误的问题
Diffstat (limited to 'server/test/signature')
-rw-r--r-- | server/test/signature/init.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/server/test/signature/init.lua b/server/test/signature/init.lua index 0c343384..bc3713d7 100644 --- a/server/test/signature/init.lua +++ b/server/test/signature/init.lua @@ -44,3 +44,25 @@ x(@) label = "function x(a: any, b: any)", arg = 'a: any' } + +TEST [[ +function mt:f(a) +end + +mt:f(@ +]] +{ + label = 'function mt:f(a: any)', + arg = 'a: any' +} + +TEST [[ +(''):sub(@ +]] +{ + label = [[ +function *string:sub(i: integer [, j: integer(-1)]) + -> string +]], + arg = 'i: integer' +} |