diff --git a/src/ameba/ast/scope.cr b/src/ameba/ast/scope.cr index 38ef9944..97b71483 100644 --- a/src/ameba/ast/scope.cr +++ b/src/ameba/ast/scope.cr @@ -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.