Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(schema/gen): return value not reference #38

Merged
merged 1 commit into from
Nov 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(schema/gen): return value not reference
Map/List should return an actual node type, not a pointer to a node. Otherwise, breaks when nested
in other map/list type
  • Loading branch information
hannahhoward committed Nov 7, 2019
commit 02b9c8dc1b242326ec17ea694b561bba5b5fb96a
2 changes: 1 addition & 1 deletion schema/gen/go/genKindListNode.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func (gk generateNbKindList) EmitNodebuilderMethodCreateList(w io.Writer) {
}

func (lb *{{ .Type | mungeTypeNodeListBuilderIdent }}) Build() (ipld.Node, error) {
v := lb.v
v := *lb.v
lb = nil
return v, nil
}
Expand Down
2 changes: 1 addition & 1 deletion schema/gen/go/genKindStructNode.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func (gk generateNbKindStruct) EmitNodebuilderMethodCreateMap(w io.Writer) {
}
{{- end}}
{{- end}}
v := mb.v
v := *mb.v
mb = nil
return v, nil
}
Expand Down