Drop type_definition? check from Scope#top_level?

This commit is contained in:
Sijawusz Pur Rahnama 2023-12-28 00:50:33 +01:00
parent a49faa33a9
commit 4567293add

View file

@ -198,7 +198,7 @@ module Ameba::AST
# Returns `true` if this scope is a top level scope, `false` otherwise.
def top_level?
outer_scope.nil? || type_definition?
outer_scope.nil?
end
# Returns `true` if var is an argument in current scope, `false` otherwise.