From c705703025a65cbbc8ffbd31d08b33e034fb1573 Mon Sep 17 00:00:00 2001 From: kenji yoshida <6b656e6a69@gmail.com> Date: Tue, 24 Sep 2024 07:38:38 +0900 Subject: [PATCH] use SAM instead of anonymous class --- .../src/main/scala-3.0+/eu/timepit/refined/internal/ToInt.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/shared/src/main/scala-3.0+/eu/timepit/refined/internal/ToInt.scala b/modules/core/shared/src/main/scala-3.0+/eu/timepit/refined/internal/ToInt.scala index ba16e3046..60d359dfa 100644 --- a/modules/core/shared/src/main/scala-3.0+/eu/timepit/refined/internal/ToInt.scala +++ b/modules/core/shared/src/main/scala-3.0+/eu/timepit/refined/internal/ToInt.scala @@ -11,7 +11,7 @@ object ToInt { def apply[N <: Int](implicit toInt: ToInt[N]): ToInt[N] = toInt inline implicit def materialize[N <: Int]: ToInt[N] = - new ToInt[N] { override def apply(): Int = toInt[N] } + () => toInt[N] private inline def toInt[N <: Int]: Int = inline erasedValue[N] match {