@@ -315,7 +315,7 @@ local function checkLocal(state, word, position, results)
315315 return orders [a ] < orders [b ]
316316 end )
317317 for _ , def in ipairs (defs ) do
318- if def .type == ' function'
318+ if ( def .type == ' function' and not vm . isVarargFunctionWithOverloads ( def ))
319319 or def .type == ' doc.type.function' then
320320 local funcLabel = name .. getParams (def , false )
321321 buildFunction (results , source , def , false , {
490490local function checkFieldThen (state , name , src , word , startPos , position , parent , oop , results )
491491 local value = vm .getObjectFunctionValue (src ) or src
492492 local kind = define .CompletionItemKind .Field
493- if value .type == ' function'
493+ if ( value .type == ' function' and not vm . isVarargFunctionWithOverloads ( value ))
494494 or value .type == ' doc.type.function' then
495495 if oop then
496496 kind = define .CompletionItemKind .Method
@@ -572,9 +572,11 @@ local function checkFieldOfRefs(refs, state, word, startPos, position, parent, o
572572 local value = vm .getObjectFunctionValue (src ) or src
573573 if value .type == ' function'
574574 or value .type == ' doc.type.function' then
575- funcLabel = name .. getParams (value , oop )
576- fields [funcLabel ] = src
577- count = count + 1
575+ if not vm .isVarargFunctionWithOverloads (value ) then
576+ funcLabel = name .. getParams (value , oop )
577+ fields [funcLabel ] = src
578+ count = count + 1
579+ end
578580 if value .type == ' function' and value .bindDocs then
579581 for _ , doc in ipairs (value .bindDocs ) do
580582 if doc .type == ' doc.overload' then
0 commit comments