有没有办法用 Nim 创建循环引用?

Is there any way to create circural reference with Nim?

我正在尝试做这样的事情:

type
  User = ref object
    email: string
    session: Session # ERROR! undeclared identifier 'Session'

type 
  Session = ref object 
    key: string
    user: User

有什么办法可以用 Nim 做到吗?

好的,答案是像这样使用单个“类型”语句:

type
  User = ref object
    email: string
    session: Session # NO ERROR :)
  Session = ref object 
    key: string
    user: User