summaryrefslogtreecommitdiff
path: root/script-beta/core/diagnostics
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta/core/diagnostics')
-rw-r--r--script-beta/core/diagnostics/redundant-parameter.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/script-beta/core/diagnostics/redundant-parameter.lua b/script-beta/core/diagnostics/redundant-parameter.lua
index b6225678..a03a408f 100644
--- a/script-beta/core/diagnostics/redundant-parameter.lua
+++ b/script-beta/core/diagnostics/redundant-parameter.lua
@@ -36,15 +36,15 @@ end
local function countFuncArgs(source)
local result = 0
+ if source.parent and source.parent.type == 'setmethod' then
+ result = result + 1
+ end
if not source.args then
return result
end
if source.args[#source.args].type == '...' then
return math.maxinteger
end
- if source.parent and source.parent.type == 'setmethod' then
- result = result + 1
- end
result = result + #source.args
return result
end