From e5a20930cb1c0b1044370350b23089badfab7375 Mon Sep 17 00:00:00 2001 From: stevenfontanella Date: Sun, 7 Jun 2026 20:28:08 +0000 Subject: [PATCH] Fix type for imported functions --- src/wasm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wasm.h b/src/wasm.h index 9f81336144d..cd6e364da17 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -2400,9 +2400,10 @@ struct CodeAnnotation { class Function : public Importable { public: + Function() : type(Signature(), NonNullable, imported() ? Inexact : Exact) {} + // A non-nullable reference to a function type. Exact for defined functions. - // TODO: Inexact for imported functions. - Type type = Type(Signature(), NonNullable, Exact); + Type type; IRProfile profile = IRProfile::Normal; std::vector vars; // non-param locals