BUG: Substitution does not penetrate Switch expressions

This commit is contained in:
Emi Simpson 2024-03-16 18:08:40 -04:00
parent 55fa7add0e
commit e6d8933ccf
Signed by: Emi
GPG Key ID: A12F2C2FFDC3D847
1 changed files with 1 additions and 1 deletions

2
ir.py
View File

@ -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: