From e6d8933ccf335f6237aa77970d514b7f16d6c377 Mon Sep 17 00:00:00 2001 From: Emi Simpson Date: Sat, 16 Mar 2024 18:08:40 -0400 Subject: [PATCH] BUG: Substitution does not penetrate Switch expressions --- ir.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ir.py b/ir.py index cf7d2ba..809f555 100644 --- a/ir.py +++ b/ir.py @@ -292,7 +292,7 @@ class Switch: def subst(self, expression: Expression, variable: str) -> Expression: return Switch( {i: e.subst(expression, variable) for i, e in self.branches.items()}, - self.fallback, + self.fallback.subst(expression, variable), self.switching_on.subst(expression, variable)) def is_value(self) -> bool: