diff --git a/cty/primitive_type.go b/cty/primitive_type.go index 60390173..3ce2540b 100644 --- a/cty/primitive_type.go +++ b/cty/primitive_type.go @@ -74,6 +74,8 @@ func rawNumberEqual(a, b *big.Float) bool { return false case a == nil: // b == nil too then, due to previous case return true + case a.Sign() != b.Sign(): + return false default: // This format and precision matches that used by cty/json.Marshal, // and thus achieves our definition of "two numbers are equal if