mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Fix bug in AST::Scope#in_macro?
not taking account for Crystal::MacroFor
This commit is contained in:
parent
71de3f0012
commit
e6ad7c5d24
1 changed files with 2 additions and 1 deletions
|
@ -112,7 +112,8 @@ module Ameba::AST
|
|||
|
||||
# Returns `true` if current scope sits inside a macro.
|
||||
def in_macro?
|
||||
node.is_a?(Crystal::Macro) || !!outer_scope.try(&.in_macro?)
|
||||
(node.is_a?(Crystal::Macro) || node.is_a?(Crystal::MacroFor)) ||
|
||||
!!outer_scope.try(&.in_macro?)
|
||||
end
|
||||
|
||||
# Returns `true` if instance variable is assinged in this scope.
|
||||
|
|
Loading…
Reference in a new issue