Skip to content

Commit

Permalink
Fixed rettype encoding for enum and set
Browse files Browse the repository at this point in the history
  • Loading branch information
yglukhov committed Mar 21, 2024
1 parent da3876e commit f3906e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wasmrt.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f3906e6

Please sign in to comment.