diff --git a/compilers/concrete-compiler/compiler/include/concretelang/Transforms/TypeInferenceRewriter.h b/compilers/concrete-compiler/compiler/include/concretelang/Transforms/TypeInferenceRewriter.h index 334fe15dbc..c874a69f6e 100644 --- a/compilers/concrete-compiler/compiler/include/concretelang/Transforms/TypeInferenceRewriter.h +++ b/compilers/concrete-compiler/compiler/include/concretelang/Transforms/TypeInferenceRewriter.h @@ -125,8 +125,9 @@ class TypeInferenceRewriter { // Replace original function and remove suffix from the name of the new // function + std::string oldFuncName = func.getName().str(); rewriter.replaceOp(func, newFunc->getResults()); - newFunc.setName(func.getName()); + newFunc.setName(oldFuncName); return mlir::success(); }