diff --git a/src/compiler/crystal/semantic/bindings.cr b/src/compiler/crystal/semantic/bindings.cr index 3dec1aff6dd1..eb4d0369cd32 100644 --- a/src/compiler/crystal/semantic/bindings.cr +++ b/src/compiler/crystal/semantic/bindings.cr @@ -111,7 +111,7 @@ module Crystal end end - def bind_to(nodes : Array) + def bind_to(nodes : Indexable) return if nodes.empty? bind do |dependencies| diff --git a/src/compiler/crystal/semantic/main_visitor.cr b/src/compiler/crystal/semantic/main_visitor.cr index e6204686ed9e..37a158055543 100644 --- a/src/compiler/crystal/semantic/main_visitor.cr +++ b/src/compiler/crystal/semantic/main_visitor.cr @@ -1873,7 +1873,7 @@ module Crystal @unreachable = then_unreachable && else_unreachable - node.bind_to [node.then, node.else] + node.bind_to({node.then, node.else}) false end