Browse Source

Fixed objectGoReflect equality. See #403

Dmitry Panov 3 years ago
parent
commit
189bfeb9f5
1 changed files with 7 additions and 1 deletions
  1. 7 1
      object_goreflect.go

+ 7 - 1
object_goreflect.go

@@ -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
 }