From 3c298cb62142b5787e261b321477dea7612427b0 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Mon, 29 Aug 2022 09:04:25 -0300 Subject: [PATCH] Compiler: bind to tuple, not array --- src/compiler/crystal/semantic/bindings.cr | 2 +- src/compiler/crystal/semantic/main_visitor.cr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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