From 919b33bbe8699d36767c2dbce7b9bdb8806bb26f Mon Sep 17 00:00:00 2001 From: Antonio Gelameris Date: Wed, 14 Feb 2024 13:49:35 +0100 Subject: [PATCH 1/2] Reduce visibility of member in a syntax class --- core/src/main/scala/cats/data/NonEmptyMapImpl.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/scala/cats/data/NonEmptyMapImpl.scala b/core/src/main/scala/cats/data/NonEmptyMapImpl.scala index 052ccc2a51..9b8cebd01a 100644 --- a/core/src/main/scala/cats/data/NonEmptyMapImpl.scala +++ b/core/src/main/scala/cats/data/NonEmptyMapImpl.scala @@ -70,7 +70,7 @@ object NonEmptyMapImpl extends NonEmptyMapInstances with Newtype2 { } -sealed class NonEmptyMapOps[K, A](val value: NonEmptyMap[K, A]) { +sealed class NonEmptyMapOps[K, A](private[data] val value: NonEmptyMap[K, A]) { /** * Converts this map to a `SortedMap`. From a9b2f73e59b170d89132f2ca2308c95a74ccd2e5 Mon Sep 17 00:00:00 2001 From: Antonio Gelameris Date: Thu, 15 Feb 2024 17:56:08 +0100 Subject: [PATCH 2/2] Reduce visibility of member in NonEmptySet syntax class --- core/src/main/scala/cats/data/NonEmptySet.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/scala/cats/data/NonEmptySet.scala b/core/src/main/scala/cats/data/NonEmptySet.scala index ad5e5b3dc2..f9b7dd78a4 100644 --- a/core/src/main/scala/cats/data/NonEmptySet.scala +++ b/core/src/main/scala/cats/data/NonEmptySet.scala @@ -62,7 +62,7 @@ object NonEmptySetImpl extends NonEmptySetInstances with Newtype { } @suppressUnusedImportWarningForScalaVersionSpecific -sealed class NonEmptySetOps[A](val value: NonEmptySet[A]) { +sealed class NonEmptySetOps[A](private[data] val value: NonEmptySet[A]) { implicit private val ordering: Ordering[A] = toSortedSet.ordering implicit private val order: Order[A] = Order.fromOrdering