Do not automatically consider type definitions as referenced

This commit is contained in:
Sijawusz Pur Rahnama 2023-12-14 02:33:43 +01:00
parent c9bc01f88c
commit 4ad151e5e0

View file

@ -32,9 +32,7 @@ module Ameba::AST
return unless scope = @variable.scope
@branch = Branch.of(@node, scope)
@referenced = true if @variable.special? ||
@variable.scope.type_definition? ||
referenced_in_loop?
@referenced = true if @variable.special? || referenced_in_loop?
end
def referenced_in_loop?