Skip to content

json.to fails with ref Bar #12316

Closed
@dawkot

Description

@dawkot
import json

type
  Foo = ref Bar
  Bar = object

discard "".parseJson.to Foo

/usercode/in.nim(7, 21) template/generic instantiation of to from here
/nim/lib/pure/json.nim(1217, 11) Error: type mismatch: got <typeof(nil)> but expected 'Bar = object'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions