Skip to content

Commit

Permalink
fix xreflect.fromReflectStruct(): canrebuildexactly was miscomputed d…
Browse files Browse the repository at this point in the history
…ue to missing () in boolean expression
  • Loading branch information
cosmos72 committed Apr 6, 2018
1 parent da77a0d commit 8300c13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xreflect/fromreflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ func (v *Universe) fromReflectStruct(rtype reflect.Type) Type {
for i := 0; i < n; i++ {
rfield := rtype.Field(i)
fields[i] = v.fromReflectField(&rfield)
if canrebuildexactly && fields[i].Anonymous || !ast.IsExported(fields[i].Name) {
if canrebuildexactly && (fields[i].Anonymous || !ast.IsExported(fields[i].Name)) {
canrebuildexactly = false
}
}
Expand Down

0 comments on commit 8300c13

Please sign in to comment.