From 4567293add134a591e79e1177c5d110a3c89e6ac Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Thu, 28 Dec 2023 00:50:33 +0100 Subject: [PATCH] Drop `type_definition?` check from `Scope#top_level?` --- src/ameba/ast/scope.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.