Skip to content

Commit 497eb21

Browse files
committed
fix(diagnostics): fix arg list thinking self was an arg with type specified preventing comment diagnostics on methods for missing-export-doc
1 parent ab2dfbf commit 497eb21

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

script/core/diagnostics/helper/missing-doc-helper.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ local function checkFunctionNamed(functionName, source, diagnosticRangeSource, b
4949
diagnosticRangeSource = diagnosticRangeSource or source
5050
bindDocsSource = bindDocsSource or source
5151
local argCount = source.args and #source.args or 0
52+
local noRealArgs = argCount == 0 or (argCount == 1 and source.args[1][1] == 'self')
5253

53-
if argCount == 0 and not source.returns and not bindDocsSource.bindDocs then
54+
if noRealArgs and not source.returns and not bindDocsSource.bindDocs then
5455
callback {
5556
start = diagnosticRangeSource.start,
5657
finish = diagnosticRangeSource.finish,

0 commit comments

Comments
 (0)