make jsffi properly gensym (#22539)

fixes #21208
This commit is contained in:
metagn
2023-08-23 20:25:26 +03:00
committed by GitHub
parent 4f891aa50c
commit 03f267c801
2 changed files with 35 additions and 22 deletions

View File

@@ -265,3 +265,9 @@ block: # test **
doAssert to(`**`(a + a, b), int) == 2
doAssert to(`**`(toJs(1) + toJs(1), toJs(2)), int) == 4
block: # issue #21208
type MyEnum = enum baz
var obj: JsObject
{.emit: "`obj` = {bar: {baz: 123}}".}
discard obj.bar.baz