Skip to content

Commit

Permalink
fix custom type implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
austinvalle committed Dec 3, 2024
1 parent a2d4066 commit a85b9d5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions internal/testing/testtypes/numberwithvalidateattribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (t NumberTypeWithValidateAttributeWarning) Equal(o attr.Type) bool {
if !ok {
return false
}
return t.Equal(other)
return t.NumberType.Equal(other.NumberType)
}

func (t NumberTypeWithValidateAttributeWarning) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error) {
Expand Down Expand Up @@ -134,7 +134,7 @@ func (v NumberValueWithValidateAttributeWarning) Equal(value attr.Value) bool {
return false
}

return v.InternalNumber.Number.Equal(other.InternalNumber.Number)
return v.InternalNumber.Equal(other.InternalNumber)
}

func (v NumberValueWithValidateAttributeWarning) IsNull() bool {
Expand Down
4 changes: 2 additions & 2 deletions internal/testing/testtypes/stringwithvalidateattribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (v StringValueWithValidateAttributeError) Equal(value attr.Value) bool {
return false
}

return v.Equal(other)
return v.InternalString.Equal(other.InternalString)
}

func (v StringValueWithValidateAttributeError) IsNull() bool {
Expand Down Expand Up @@ -134,7 +134,7 @@ func (v StringValueWithValidateAttributeWarning) Equal(value attr.Value) bool {
return false
}

return v.Equal(other)
return v.InternalString.Equal(other.InternalString)
}

func (v StringValueWithValidateAttributeWarning) IsNull() bool {
Expand Down
2 changes: 1 addition & 1 deletion internal/testing/testtypes/stringwithvalidateparameter.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (v StringValueWithValidateParameterError) Equal(value attr.Value) bool {
return false
}

return v.Equal(other)
return v.InternalString.Equal(other.InternalString)
}

func (v StringValueWithValidateParameterError) IsNull() bool {
Expand Down

0 comments on commit a85b9d5

Please sign in to comment.