Skip to content

Commit

Permalink
Fixed objectGoReflect equality. See dop251#403
Browse files Browse the repository at this point in the history
  • Loading branch information
dop251 committed Jul 5, 2022
1 parent b1618db commit 189bfeb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion object_goreflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,13 @@ func (o *objectGoReflect) exportType() reflect.Type {

func (o *objectGoReflect) equal(other objectImpl) bool {
if other, ok := other.(*objectGoReflect); ok {
return o.value == other.value
k1, k2 := o.value.Kind(), other.value.Kind()
if k1 == k2 {
if isContainer(k1) {
return o.value == other.value
}
return o.value.Interface() == other.value.Interface()
}
}
return false
}
Expand Down

0 comments on commit 189bfeb

Please sign in to comment.