diff options
Diffstat (limited to 'server-beta/src/core/diagnostics/unused-function.lua')
-rw-r--r-- | server-beta/src/core/diagnostics/unused-function.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server-beta/src/core/diagnostics/unused-function.lua b/server-beta/src/core/diagnostics/unused-function.lua index 0886660d..0dd55906 100644 --- a/server-beta/src/core/diagnostics/unused-function.lua +++ b/server-beta/src/core/diagnostics/unused-function.lua @@ -10,11 +10,10 @@ return function (uri, callback) return end guide.eachSourceType(ast.ast, 'function', function (source) - local hasGet local hasSet - searcher.eachRef(source, function (info) + local hasGet = searcher.eachRef(source, function (info) if info.mode == 'get' then - hasGet = true + return true elseif info.mode == 'set' or info.mode == 'declare' then hasSet = true |