t12303.nim 171 B

1234567891011121314151617
  1. discard """
  2. output: "{ b: 2 }"
  3. """
  4. import jsconsole, jsffi
  5. type
  6. A = ref object
  7. b: B
  8. B = object
  9. b: int
  10. var a = cast[A](js{})
  11. a.b = B(b: 2)
  12. console.log a.b