diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-08-09 16:30:21 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-08-09 16:30:21 +0800 |
commit | 91869bc5f447dc07ecc78695852e719c67af9b85 (patch) | |
tree | 3a3de998fc2d6965e4cc6aad74007b5912e55958 /script | |
parent | b96ab075f43e04d5bb42566df4f7c172b35a3df8 (diff) | |
download | lua-language-server-91869bc5f447dc07ecc78695852e719c67af9b85.zip |
fix wrong hover and signature for method
with varargs and overloads
Diffstat (limited to 'script')
-rw-r--r-- | script/vm/function.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/script/vm/function.lua b/script/vm/function.lua index bdd7e229..c6df6349 100644 --- a/script/vm/function.lua +++ b/script/vm/function.lua @@ -372,8 +372,14 @@ function vm.isVarargFunctionWithOverloads(func) if not func.args then return false end - if not func.args[1] or func.args[1].type ~= '...' then - return false + if func.args[1] and func.args[1].type == 'self' then + if not func.args[2] or func.args[2].type ~= '...' then + return false + end + else + if not func.args[1] or func.args[1].type ~= '...' then + return false + end end if not func.bindDocs then return false |