Fix simplifyType not expanding to the full solution
This commit is contained in:
parent
1147c751b9
commit
d0b9c9702b
1 changed files with 4 additions and 1 deletions
|
@ -71,7 +71,10 @@ namespace bolt {
|
|||
|
||||
Type* Type::rewrite(std::function<Type*(Type*)> 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) {
|
||||
|
|
Loading…
Reference in a new issue