fixes #21317; 1.6.4 regression; etyBaseIndex should return fat pointers [backport 1.6] (#21320)

fixes #21317; regression; etyBaseIndex should return fat pointers
This commit is contained in:
ringabout 2023-02-01 14:58:12 +08:00 • committed by GitHub
commit cbf3ed9d92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 3 deletions

15
tests/system/trefs.nim Normal file
View file

@ -0,0 +1,15 @@
discard """
targets: "c js"
"""
# bug #21317
proc parseHook*(v: var ref int) =
var a: ref int
new(a)
a[] = 123
v = a
proc fromJson2*(): ref int =
parseHook(result)
doAssert fromJson2()[] == 123