From f3906e6755d70b96e65760f7de241fb86a764203 Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Thu, 21 Mar 2024 10:25:11 +0100 Subject: [PATCH] Fixed rettype encoding for enum and set --- wasmrt.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wasmrt.nim b/wasmrt.nim index e3cee23..3e6a23e 100644 --- a/wasmrt.nim +++ b/wasmrt.nim @@ -66,7 +66,9 @@ proc retTypeSig(r, f, a: int): string = proc retTypeR(t: typedesc): int = when t is (JSRef|JSObj): 2 elif t is void: 0 - elif t is (int|int32|uint|uint32|bool): 1 + elif t is (int|int32|uint|uint32|bool|enum|set): 1 + else: + {.error: "Unexpected return type " & $t.} proc retTypeSig(t: typedesc, f, a: int): string = retTypeSig(retTypeR(t), f, a)