summary refs log tree commit diff stats
path: root/tests/js/t12303.nim
blob: 270d82cedbc5dc5850fc9f837e69017fc80622e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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