Closed
Description
When trying to create a simple graph structure - a struct
containing a slice of itself - I am getting problems in gophernotes
.
Same works fine in just plain go
file.
Code:
package main
import "fmt"
type Item struct {
Name string
Children []Item
}
graph := Item{
Name: "my-name",
Children: []Item{
{Name: "other-name"},
},
}
throws error (warning?)
reflect.Value.Convert: value of type []struct { Name string; Children []xreflect.Forward } cannot be converted to type []xreflect.Forward