diff options
Diffstat (limited to 'tests/js')
-rw-r--r-- | tests/js/t12303.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/js/t12303.nim b/tests/js/t12303.nim new file mode 100644 index 000000000..270d82ced --- /dev/null +++ b/tests/js/t12303.nim @@ -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 |