diff --git a/internal/core/adt/conjunct.go b/internal/core/adt/conjunct.go index 8e1766f54ab..d46efeaf1be 100644 --- a/internal/core/adt/conjunct.go +++ b/internal/core/adt/conjunct.go @@ -638,6 +638,7 @@ func (n *nodeContext) insertValueConjunct(env *Environment, v Value, id CloseInf c := MakeConjunct(nil, a, id) n.insertArc(a.Label, a.ArcType, c, id, true) } + n.node.Structs = append(n.node.Structs, x.Structs...) case Value: n.insertValueConjunct(env, v, id) diff --git a/internal/core/convert/go.go b/internal/core/convert/go.go index da4a754ee44..30282fb62cf 100644 --- a/internal/core/convert/go.go +++ b/internal/core/convert/go.go @@ -416,6 +416,7 @@ func (c *goConverter) convertRec(nilIsTop bool, x interface{}) (result adt.Value case reflect.Struct: sl := &adt.StructLit{Src: c.setNextPos(ast.NewStruct())} + sl.Init(c.ctx) v := &adt.Vertex{} t := value.Type() @@ -476,6 +477,7 @@ func (c *goConverter) convertRec(nilIsTop bool, x interface{}) (result adt.Value case reflect.Map: obj := &adt.StructLit{Src: c.setNextPos(ast.NewStruct())} + obj.Init(c.ctx) v := &adt.Vertex{} t := value.Type() diff --git a/pkg/time/testdata/gen.txtar b/pkg/time/testdata/gen.txtar index d7c880207ec..0b89a35b6ba 100644 --- a/pkg/time/testdata/gen.txtar +++ b/pkg/time/testdata/gen.txtar @@ -41,12 +41,12 @@ parse: { } split: { t1: { + year: 2017 + month: 7 day: 14 hour: 2 minute: 40 - month: 7 - nanosecond: 123456 second: 0 - year: 2017 + nanosecond: 123456 } }