From d0b9c9702b01dbb6b20e8056d08ed54c44324126 Mon Sep 17 00:00:00 2001 From: Sam Vervaeck Date: Mon, 5 Jun 2023 15:51:40 +0200 Subject: [PATCH] Fix simplifyType not expanding to the full solution --- src/Types.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Types.cc b/src/Types.cc index a198ef624..9e2c19e75 100644 --- a/src/Types.cc +++ b/src/Types.cc @@ -71,7 +71,10 @@ namespace bolt { Type* Type::rewrite(std::function Fn, bool Recursive) { auto Ty2 = Fn(this); - if (!Recursive && this != Ty2) { + if (this != Ty2) { + if (Recursive) { + return Ty2->rewrite(Fn, Recursive); + } return Ty2; } switch (Kind) {