File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,10 @@ func (a AttributeValue) Equal(av AttributeValue) bool {
269
269
return a .orig .Value == av .orig .Value
270
270
}
271
271
272
+ if a .Type () != av .Type () {
273
+ return false
274
+ }
275
+
272
276
switch v := a .orig .Value .(type ) {
273
277
case * otlpcommon.AnyValue_StringValue :
274
278
return v .StringValue == av .orig .GetStringValue ()
Original file line number Diff line number Diff line change @@ -201,15 +201,15 @@ func TestAttributeValueEqual(t *testing.T) {
201
201
av1 = NewAttributeValueDouble (123 )
202
202
assert .True (t , av1 .Equal (av2 ))
203
203
204
- av2 = NewAttributeValueBool (true )
204
+ av2 = NewAttributeValueBool (false )
205
205
assert .False (t , av1 .Equal (av2 ))
206
206
assert .False (t , av2 .Equal (av1 ))
207
207
208
208
av1 = NewAttributeValueBool (true )
209
- assert .True (t , av1 .Equal (av2 ))
209
+ assert .False (t , av1 .Equal (av2 ))
210
210
211
211
av1 = NewAttributeValueBool (false )
212
- assert .False (t , av1 .Equal (av2 ))
212
+ assert .True (t , av1 .Equal (av2 ))
213
213
214
214
av1 = NewAttributeValueArray ()
215
215
av1 .ArrayVal ().AppendEmpty ().SetIntVal (123 )
You can’t perform that action at this time.
0 commit comments