Skip to content

Commit a85b9d5

Browse files
committed
fix custom type implementations
1 parent a2d4066 commit a85b9d5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

internal/testing/testtypes/numberwithvalidateattribute.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (t NumberTypeWithValidateAttributeWarning) Equal(o attr.Type) bool {
9292
if !ok {
9393
return false
9494
}
95-
return t.Equal(other)
95+
return t.NumberType.Equal(other.NumberType)
9696
}
9797

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

137-
return v.InternalNumber.Number.Equal(other.InternalNumber.Number)
137+
return v.InternalNumber.Equal(other.InternalNumber)
138138
}
139139

140140
func (v NumberValueWithValidateAttributeWarning) IsNull() bool {

internal/testing/testtypes/stringwithvalidateattribute.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (v StringValueWithValidateAttributeError) Equal(value attr.Value) bool {
6464
return false
6565
}
6666

67-
return v.Equal(other)
67+
return v.InternalString.Equal(other.InternalString)
6868
}
6969

7070
func (v StringValueWithValidateAttributeError) IsNull() bool {
@@ -134,7 +134,7 @@ func (v StringValueWithValidateAttributeWarning) Equal(value attr.Value) bool {
134134
return false
135135
}
136136

137-
return v.Equal(other)
137+
return v.InternalString.Equal(other.InternalString)
138138
}
139139

140140
func (v StringValueWithValidateAttributeWarning) IsNull() bool {

internal/testing/testtypes/stringwithvalidateparameter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (v StringValueWithValidateParameterError) Equal(value attr.Value) bool {
6464
return false
6565
}
6666

67-
return v.Equal(other)
67+
return v.InternalString.Equal(other.InternalString)
6868
}
6969

7070
func (v StringValueWithValidateParameterError) IsNull() bool {

0 commit comments

Comments
 (0)