Skip to content

Commit f76973a

Browse files
committed
Modified singletonWitnessAs to use valueOf instead of constValue
1 parent 01c5220 commit f76973a

File tree

1 file changed

+2
-2
lines changed
  • modules/core/shared/src/main/scala-3.0+/eu/timepit/refined/internal

1 file changed

+2
-2
lines changed

modules/core/shared/src/main/scala-3.0+/eu/timepit/refined/internal/WitnessAs.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ object WitnessAs extends WitnessAs1 {
3535
): WitnessAs[A, B] =
3636
WitnessAs(wa.value, nb.fromInt(ta.apply()))
3737

38-
inline given singletonWitnessAs[B, A <: B]: WitnessAs[A, B] = {
39-
inline val a = constValue[A]
38+
inline given singletonWitnessAs[B, A <: B: ValueOf]: WitnessAs[A, B] = {
39+
val a = valueOf[A]
4040
WitnessAs(a, a)
4141
}
4242
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy