This commit is contained in:
flywind 2020-11-14 19:51:23 +08:00 • committed by GitHub
commit 47ce24f680
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 2 deletions

16
tests/js/t12303.nim Normal file
View file

@ -0,0 +1,16 @@
discard """
output: "{ b: 2 }"
"""
import jsconsole, jsffi
type
A = ref object
b: B
B = object
b: int
var a = cast[A](js{})
a.b = B(b: 2)
console.log a.b

View file

@ -4,6 +4,7 @@ discard """
123
1234
12345
123456
'''
"""
@ -28,6 +29,8 @@ getF().a = 1234
echo getF().a
getF() = Foo(a: 12345)
echo getF().a
(addr getF())[] = Foo(a: 123456)
echo getF().a
block: # #13848