From e9d0fb7251dd6dd3d629fe6c389490a0a0e92c24 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Mon, 11 Sep 2023 12:53:40 -0500 Subject: Fix printing of types for imported functions (#5927) Previously, the printer incorrectly reconstructed imported functions' types from their signatures instead of printing their types directly. This could cause the printer to print uses of types that were never defined and did not exist in the module. Fix the bug by printing imported functions' heap types directly. --- src/passes/Print.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/passes/Print.cpp') diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 7ceb4393a..87e30c882 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -2846,7 +2846,7 @@ void PrintSExpression::visitImportedFunction(Function* curr) { lastPrintedLocation = {0, 0, 0}; o << '('; emitImportHeader(curr); - handleSignature(curr->getSig(), curr->name); + handleSignature(curr->type, curr->name); o << ')'; o << maybeNewLine; } -- cgit v1.2.3